Skip to content

Point-to-point durable message queues as GenStage producers

License

Notifications You must be signed in to change notification settings

ausimian/stagger

Repository files navigation

Stagger

License: MIT Build Status Coverage Status Hex Hex Docs

Point-to-point, durable message-queues as GenStage producers.

Stagger enables the creation of GenStage processes that enqueue terms to simple, file-backed message-queues, allowing the producer and consumer to run independently of each other, possibly at different times.

+----------+    +----------+    +----------+       +------------+
| Upstream |    | MsgQueue |    | MsgQueue |       | Downstream |
|          | -> |          | <- |          | <---> |            |
|  Client  |    | Producer |    | Consumer |       | Processing |
+----------+    +----------+    +----------+       +------------+
                  |    | read
            write |    |
                 +------+
                 | FILE |
                 |      |
                 |      |
                 +------+

Your upstream client writes its events into the message-queue (provided by Stagger), which persists them to local storage. Your (GenStage) consumer, subscribes to the producer and receives events, via this local storage.

Installation

The package can be installed by adding stagger to your list of dependencies in mix.exs:

def deps do
  [
    {:stagger, "~> 0.1.7"}
  ]
end

The docs can be found at https://hexdocs.pm/stagger.

Copyright and License

Copyright (c) 2022, Nick Gunn

Stagger runtime source code is licensed under the MIT License. Stagger test source code is licensed under the GPL3 License.

About

Point-to-point durable message queues as GenStage producers

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages