View Source Rambla.Amqp (Rambla v1.2.5)
Default connection implementation for 🐰 Rabbit.
publish/2 accepts the following options:
exchange[binary(), mandatory] the exchange to publish toqueue[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 installationdeclare?[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 publishingrouting_key[binary(), optional, default:""] if passed, used as a routing keyoptions[keyword(), optional, default:[]] the options to be passed as is to call toAMQP.Basic.publish/5
Since v0.6.0 provides two mix tasks:
mix rambla.rabbit.exchangeOperations with exchanges in RabbitMQmix rambla.rabbit.queueOperations with queues in RabbitMQ
Tasks support arguments to be passed to RabbitMQ instance. Usage example:
mix rambla.rabbit.queue declare foo -o durable:true