- Publisher Confirms
- Import/Export definitions
- Consumer Cancellation
- Configuration files
- Consumer Acknowledgments
- Persistent Exchange
- Dead Letter Exchange
- Consistent Hash Exchange
- Alternate Exchange
- Direct Reply-to
- Delayed Message Exchange
- Pause Consumers
AMQP 0-9-1 Overview
Management HTTP API
LavinMQ with Ruby
Ruby developers has a number of options for AMQP client libraries:
- Bunny is the most popular client
- March Hare is an idiomatic, fast and well-maintained (J)Ruby DSL on top of the RabbitMQ Java client
- AMQP EventMachine-based RabbitMQ client is deprecated. Only use if you are already using EventMachine.
Code example using Bunny
The following example will use the synchronous client Bunny to publish a message and to consume it.
We begin by adding the environment variable HOST_URL to our .env file.
Then, we add these gems to our Gemfile if they are not yet added.
Further, we create a script and name it publish.rb. In the publish.rb script we will write down a simple example on how to publish a message.
Then, we create another script and name it subscribe.rb. In the subscribe.rb script we will write down a simple example on how to consume a message.
Finally, in each terminal window, we run the scripts subscribe.rb and publish.rb respectively.