
When a user places an order, the system has to charge the card, reserve stock, send a confirmation email, generate an invoice and notify the warehouse. If the web request does all of that itself, the user waits for the slowest step, and one failing service takes the whole order down with it. A message broker breaks that chain: the order service publishes a message and returns, and each of the other jobs is done by its own worker, at its own pace. RabbitMQ is one of the most widely used open-source brokers for exactly this pattern.
This article explains what RabbitMQ is, how exchanges and queues route messages, where it fits, where a log-based system such as Kafka is the better tool, and how it compares with the alternatives.
What is RabbitMQ?
RabbitMQ is an open-source message broker: a server that accepts messages from applications, stores them in queues and delivers them to the applications that consume them. It is written in Erlang, a language built for fault-tolerant telecom systems, and it speaks several messaging protocols: AMQP 0-9-1, AMQP 1.0, MQTT and STOMP, along with its own stream protocol.
The project started in 2006 at the software company LShift, in a joint venture with CohesiveFT, and its first public release followed in February 2007. SpringSource, then part of VMware, acquired the company behind it in 2010, and the core team has since moved with VMware into Broadcom. The server is released under the Mozilla Public License 2.0, and Broadcom sells commercial support and long-term support releases alongside the free community edition.
RabbitMQ 4.0, released in September 2024, was the biggest change in years. It removed classic queue mirroring, the old way of replicating queues, in favour of quorum queues, made AMQP 1.0 a core protocol, and made Khepri, a new metadata store, fully supported. New release series appear roughly twice a year, and community support covers only the most recent ones, so staying current is part of running it.
How RabbitMQ works
Producers, exchanges, queues and consumers. An application that sends messages is a producer. It does not write to a queue directly; it publishes to an exchange. The exchange routes each message to one or more queues according to bindings, and consumers read from the queues.
Exchange types decide the routing.
- Direct: the message goes to queues whose binding key matches its routing key exactly, for example
invoice.created. - Topic: binding keys use wildcards, so
order.*.eucan collect all European order events. - Fanout: every bound queue gets a copy, which suits broadcasts and notifications.
- Headers: routing uses message header values instead of a routing key.
Acknowledgements make delivery reliable. A consumer confirms each message after processing it. If the consumer crashes before confirming, RabbitMQ delivers the message again to another consumer. On the publishing side, publisher confirms tell the producer that the broker has safely stored the message.
Queue types for different guarantees. Classic queues are simple and fast, without replication. Quorum queues replicate data across several nodes using the Raft consensus algorithm and are the recommended choice when messages must survive a node failure. Streams keep an append-only log that many consumers can read and replay, which brings RabbitMQ closer to Kafka-style use cases.
Key features
- Flexible routing with exchanges, bindings and routing keys, without changing producer code.
- Work queues that spread jobs across many workers, with prefetch limits so a slow worker is not flooded.
- Dead-letter exchanges and message TTL for failed or expired messages, the basis of retry and error-handling patterns.
- Several protocols in one broker, so backend services and IoT devices over MQTT can share it.
- Clustering with quorum queues for high availability, and Shovel and Federation for moving messages between sites.
- A management UI and HTTP API, plus Prometheus metrics for monitoring.
- Client libraries for practically every language, including .NET, Java, Python, Node.js and Go.
Where RabbitMQ is used
- Background jobs: sending emails, generating PDFs, resizing images and calling slow third-party APIs outside the web request.
- Microservice communication: services publish events such as "order placed" and others react, without calling each other directly.
- Integration: connecting an ERP, a payment provider and internal applications that run at different speeds and may be offline at times.
- Load levelling: absorbing traffic peaks, such as campaign launches, by queuing work that workers then process at a steady rate.
- IoT and device messaging over MQTT, with the same broker serving backend services.
When to choose RabbitMQ, and when not to
Choose RabbitMQ when:
- You need reliable task queues where each message is processed once by one worker and removed afterwards.
- Routing rules matter: different consumers need different subsets of messages.
- You want per-message acknowledgements, retries and dead-lettering with little custom code.
- Message volumes are moderate to high, but you do not need to keep or replay months of history.
Look elsewhere when:
- The core need is a durable event log that many systems replay, at very high throughput, for analytics or event sourcing. Apache Kafka is built for that.
- You only need simple background jobs inside one application. A library built on your database or Redis, or Hangfire in .NET, avoids running a separate broker.
- You are fully on one cloud and prefer a managed queue with nothing to operate, such as Amazon SQS or Azure Service Bus.
- Nobody on the team can own the broker. Clusters, whether on virtual machines or Kubernetes, need monitoring, upgrades across release series and capacity planning.
RabbitMQ and its alternatives
| Option | Model | Strength | Best fit |
|---|---|---|---|
| RabbitMQ | Broker with queues (plus streams) | Flexible routing, per-message acks | Task queues, service integration |
| Apache Kafka | Distributed, partitioned log | Throughput, retention, replay | Event streaming, analytics pipelines |
| Redis (lists, Streams) | In-memory data store | Simplicity, low latency | Lightweight queues inside one system |
| NATS | Lightweight messaging, JetStream | Low latency, simple operations | Cloud-native service messaging |
| Amazon SQS / Azure Service Bus | Managed cloud queues | No servers to run | Teams committed to one cloud |
The most common question is RabbitMQ or Kafka, and the honest answer is that they solve different problems. RabbitMQ is a smart broker that pushes messages to consumers and forgets them once they are acknowledged. Kafka is a log that keeps every event for a set period, and consumers track their own position in it. Many systems use both: Kafka for event streams and analytics, RabbitMQ for commands and jobs. Whether you need either depends on your architecture, which we discuss in Microservices vs Monolith: A Decision Framework for Enterprise CTOs.
How we use RabbitMQ at Internative
We use RabbitMQ to build resilient, event-driven backend systems. It lets us decouple services, process background jobs reliably and scale asynchronous workloads without affecting the performance of the core application.
If you are connecting several systems or moving slow work out of your main application, our system integration and enterprise software teams can help you decide whether RabbitMQ is the right backbone.
Frequently asked questions
Which is better, Kafka or RabbitMQ?
Neither is better in general. RabbitMQ suits task queues and routing: each message is handled by a consumer and then removed. Kafka suits high-volume event streams that must be stored and replayed by many consumers. Choose by the pattern you need, and use both if the system has both patterns.
What is AMQP used for?
AMQP (Advanced Message Queuing Protocol) is an open standard for sending messages between applications and brokers, defining how messages are published, routed, queued and acknowledged. RabbitMQ originally implemented AMQP 0-9-1 and, since version 4.0, also supports AMQP 1.0 as a core protocol, which lets clients and brokers from different vendors interoperate.
What are the exchange types in RabbitMQ?
There are four built-in types. Direct exchanges route by exact routing key, topic exchanges by wildcard patterns, fanout exchanges send a copy to every bound queue, and headers exchanges route by message header values. A default exchange also lets you publish straight to a queue by its name.
What are the drawbacks of RabbitMQ?
It is not designed to keep large volumes of history for replay; streams help, but Kafka is stronger there. Very long queues use a lot of memory and disk and slow the broker down, so consumers must keep up. Operating a cluster takes care, especially upgrades between release series, and community support covers only recent versions.
Do people still use RabbitMQ?
Yes. It remains one of the most common choices for task queues and service integration, it is actively developed with new release series roughly twice a year, and it is available as a managed service, for example through Amazon MQ.
Related services
Where this topic becomes an engagement.
Keep reading
The articles that follow this one.



