Rambla.Amqp (Rambla v0.15.0) View Source

Default connection implementation for 🐰 Rabbit.

publish/2 accepts the following options:

  • exchange [binary(), mandatory] the exchange to publish to
  • queue [binary(), optional] if passed, the queue will be created and bound to the exchange; it’s slowing down publishing, but safer for the cold RebbatMQ installation
  • declare?[boolean(), optional, default: true] if false is passed, the exchange would not be declared; use it if the exchange already surely exists to speed up the publishing
  • routing_key [binary(), optional, default: ""] if passed, used as a routing key
  • options [keyword(), optional, default: []] the options to be passed as is to call to AMQP.Basic.publish/5

Since v0.6.0 provides two mix tasks:

Tasks support arguments to be passed to RabbitMQ instance. Usage example:

mix rambla.rabbit.queue declare foo -o durable:true