A project providing the following abstractions:
- Connection lifecycle handling
- Channel lifecycle handling
- A consumer behaviour for consuming from a RabbitMQ queue
- A producer behaviour for publishing messages to a RabbitMQ queue
The goal of the project are:
- Make it unnecessary for the programmer to directly handle connections and channels
- Reduce the boilerplate when creating new projects that interact with RabbitMQ
As such, hooks are provided to enable the programmer to handle message delivery, cancellation, acknowlegement, rejection as well as publishing.
For more information on implementing a consumer, see the documentation of the ExRabbitMQ.Consumer
behaviour.
For more information on implementing a producer, see the documentation of the ExRabbitMQ.Producer
behaviour.
- Add
{:exrabbitmq, "~> X.Y"}
(https://hex.pm/packages/exrabbitmq) in your project'sdeps
function inmix.exs
- Run
mix deps.get
andmix compile
in your project's root directory to download and compile the package
- Run
mix deps.get
,mix compile
andmix docs
in:exrabbitmq
's root directory - Serve the
doc
folder in:exrabbitmq
's root directory with a web server