RabbitMQ
- A reliable general-purposed message broker.
- Easy to deploy on cloud environments, on-premises, and on your local machine.
- Prioritizes end-to-end message delivery.
- In RabbitMQ, the producer sends and monitors if the message reaches the intended consumer.
- This is exactly why I had this bug.
- Think of RabbitMQ as a post office that receives mail and delivers it to the intended recipients.
- Consumer application takes a passive role and waits for the RabbitMQ broker to push the message into the queue.
- E.g. a banking application might wait for SMS alerts from the central transaction processing software.
- FIFO is the default message ordering.
- Producers can escalate certain messages by using the priority queue.
- Instead of FIFO broker processes higher priority messages ahead of normal messages.
- E.g. a retail application might queue sales transactions every hour. However, if the system administrator issues a priority backup database message, the broker sends it immediately.
- Once a message is read, the consumer sends an acknowledgement (ACK) reply to the broker, which then deletes the message from the queue.
- Networks are unreliable and applications may fail to process messages therefore the AMQP 0-9-1 model has a notion of message acknowledgements.
- Supports low latency.
- Provides complex message routing/distribution with simple architecture.
- Its performance averages up to thousands of messages per second.
- Might slow down if RabbitMQ’s queues are congested.
- Comes with administrative tools to manage user permissions and broker security (learn more here).
- Fault-tolerant platform.
- Can replicate queued messages across distributed nodes in a cluster.
- Can be scaled both horizontally and vertically.
- Can leverages techniques like RabbitMQ consistent hash exchange to balance load processing across multiple brokers.
- Supports different protocols. We usually tend to use AMQP 0-9-1 protocol.
-
A simple analogy of RabbitMQ:

Use cases or scenarios suitable for RabbitMQ
| Category | Example |
|---|---|
| Broadcast events. | Massively multi-player online (MMO) games can use it for leaderboard updates or other global events. |
| Send notifications. | Sport news sites can use fanout exchanges for distributing score updates to mobile clients in near real-time. |
| Distributing data relevant to specific geographic location. | Delivering data that is specific to certain physical locations, like stores, to those locations for use in activities such as sales, inventory management, or customer interactions. |
| Background task processing done by multiple workers, each capable of handling specific set of tasks. | Like processing an uploaded video, you could have multiple services that are performing different form of processing; one is generating subtitles for it, one is trying to categorize it, one is generating different qualities of it, etc. |