RabbitMQ 4.x has three queue types: classic, quorum and stream. They share the same AMQP API, so a consumer often can't tell which one it reads from, but they behave very differently when a node crashes, when a message keeps failing, or when you need to read the same data twice. This guide compares them and gives you a simple rule for picking one.
| Classic | Quorum | Stream | |
|---|---|---|---|
| Replication | None (one node) | Raft, replicated to several nodes | Replicated to several nodes |
| Survives a node loss | No, unless the node comes back with its disk | Yes, as long as a majority of replicas is up | Yes, as long as a majority of replicas is up |
| Durable / transient | Both (non-exclusive transient queues are deprecated) | Durable only | Durable only |
| Exclusive queues | Yes | No | No |
| Consumption | Destructive (ack removes the message) | Destructive | Non-destructive: messages stay, consumers track an offset |
| Replay old messages | No | No | Yes, from any offset or timestamp |
| Message TTL | Yes | Yes | No, use retention (x-max-age) |
| Queue length limit | Yes, all overflow modes | Yes (drop-head, reject-publish) | Retention by size or age |
| Dead-lettering | Yes | Yes, plus an at-least-once strategy | No |
| Poison message handling | No (x-delivery-count not tracked) | Yes, x-delivery-limit | Not applicable |
| Priorities | Yes, up to 255 levels (x-max-priority) | Yes, two levels (normal and high) | No |
| Global QoS | Yes | No | No |
| Typical use | Temporary queues, RPC replies | Work queues, events, anything important | Fan-out to many consumers, event logs, replay |
The rest of the article explains the rows that matter most.
Classic queues are the original queue type. Since RabbitMQ 4.0 they are simpler than they used to be:
ha-mode policies) were removed in 4.0. A classic queue lives on one node. If that node's disk is lost, the messages are lost. If the node restarts, the queue is unavailable until it's back.Classic queues are still the fastest option for short-lived queues, and the only one that supports exclusive: true and auto-delete semantics well. That makes them the right choice for RPC reply queues and per-connection queues.
Quorum queues are replicated with the Raft consensus algorithm. A message is confirmed to the publisher only once a majority of replicas has written it. When the leader node fails, a follower that has every confirmed message takes over. As long as most replicas are up, the queue keeps working and loses nothing.
Things quorum queues do that classic queues don't:
x-delivery-count header. When it reaches the delivery limit, the message is dropped or dead-lettered instead of looping forever. Since RabbitMQ 4.0 the default limit is 20. Set your own with the x-delivery-limit argument or a delivery-limit policy. See message acknowledgment explained for why requeue loops happen.x-dead-letter-strategy: at-least-once (and x-overflow: reject-publish), a message is only removed from the source queue once the dead-letter target has confirmed it. With classic queues, dead-lettering is fire-and-forget.And the trade-offs:
A stream is an append-only log. Consuming doesn't remove messages: each consumer chooses where to start (first, last, next, an offset or a timestamp) with the x-stream-offset argument, and the broker keeps data until the retention limit is reached (x-max-age, x-max-length-bytes).
Choose a stream when:
Streams can be used through AMQP 0-9-1 like a queue (with a prefetch and x-stream-offset), or through the dedicated stream protocol on port 5552, which is much faster. We cover them in depth in everything you need to know about RabbitMQ streams.
The type is set once, at declaration, with the x-queue-type argument. It can't be changed later: to switch, you create a new queue and move consumers and bindings to it.
Node.js (amqplib)
await channel.assertQueue('orders', {
durable: true,
arguments: { 'x-queue-type': 'quorum', 'x-delivery-limit': 5 },
});
await channel.assertQueue('events-log', {
durable: true,
arguments: { 'x-queue-type': 'stream', 'x-max-age': '7D' },
});Python (pika)
channel.queue_declare(
queue="orders",
durable=True,
arguments={"x-queue-type": "quorum", "x-delivery-limit": 5},
)Java
Map<String, Object> args = Map.of("x-queue-type", "quorum", "x-delivery-limit", 5);
channel.queueDeclare("orders", true, false, false, args);Go (amqp091-go)
_, err := ch.QueueDeclare("orders", true, false, false, false, amqp.Table{
"x-queue-type": "quorum",
"x-delivery-limit": 5,
})C# (RabbitMQ.Client 7)
await channel.QueueDeclareAsync("orders", durable: true, exclusive: false, autoDelete: false,
arguments: new Dictionary<string, object?> { ["x-queue-type"] = "quorum", ["x-delivery-limit"] = 5 });Our cheat sheets for JavaScript, Python, Java, Go and C# have the rest of the API.
Instead of changing every declaration, you can set a default queue type for a virtual host. Queues declared without x-queue-type then become quorum queues:
rabbitmqctl add_vhost orders --default-queue-type quorum
# or for an existing vhost
rabbitmqctl update_vhost_metadata orders --default-queue-type quorumClients that declare the queue as non-durable or exclusive still get a classic queue, since a quorum queue can't be either.
If you upgrade from 3.x and used ha-mode policies, those queues become plain, non-replicated classic queues on 4.x. Before upgrading:
ha-mode, ha-params or ha-sync-mode, and the queues they match.ha-* keys from your policies.Step 1 is the painful one on a large broker, because the management UI shows policies and queues on separate pages and doesn't tell you which policy actually won for a given queue.
We go through the whole upgrade in RabbitMQ 3.x end of life: how to upgrade to 4.x.
It depends on the workload, so benchmark your own (rabbitmq-perf-test makes this easy). General tendencies:
Classic, unless the virtual host sets a different default queue type (--default-queue-type quorum) or the client passes x-queue-type.
Yes. Quorum queues are always durable, and every message is written to disk on a majority of replicas before being confirmed.
RabbitMQ separates two things: a durable queue survives a broker restart, and a persistent message (delivery mode 2) is written to disk. You need both for a classic queue to keep messages across a restart. Quorum queues and streams are always durable and store every message on disk.
No. Queue arguments are fixed at declaration. Declare a new queue with the new type, move bindings and consumers, and drain the old one.
No. They were removed in RabbitMQ 4.0. Use quorum queues for replicated data.
You can, and you get delivery limits and at-least-once dead-lettering, but no extra protection against disk loss. The replication benefit starts with three nodes.
See which policies apply to each queue, why they match, and which values are overridden.
Debug my policiesAvailable on Windows, Mac, and Linux.
RabbitMQ tutorialRabbitMQ health checks: CLI, HTTP API, Docker and KubernetesCopy-paste RabbitMQ health checks. rabbitmq-diagnostics commands, /api/health endpoints, a Docker Compose healthcheck and Kubernetes probes that don't hurt your cluster.
RabbitMQ tutorialThe RabbitMQ Management UI: a complete guideHow to enable the RabbitMQ management plugin, open the UI on port 15672 (Docker too), log in, and what each tab does, plus its limits.
RabbitMQ tutorialRabbitMQ retry queue vs dead letter queue: what's the difference?A retry queue holds a failed RabbitMQ message before another attempt, a dead-letter queue holds it once it should no longer be processed. Learn when to use each, how to combine them, and how they differ from requeue.
RabbitMQ tutorialRabbitMQ exponential backoff: how to retry messages with increasing delaysHow to implement exponential backoff retries in RabbitMQ with TTL retry queues and dead-letter exchanges. Track attempts with an x-retry-count header, choose retry delays, and send final failures to a DLQ.
RabbitMQ tutorialWhat is AMQP? The Advanced Message Queuing Protocol explainedLearn what AMQP (Advanced Message Queuing Protocol) is, how it works, its core concepts, why it powers RabbitMQ, and how it compares to alternatives like MQTT, STOMP, and Kafka.
RabbitMQ tutorialBuilding an event bus with RabbitMQLearn how to design a decoupled event bus using a RabbitMQ topic exchange, with practical routing key conventions, durable queues, and animated diagrams showing message flow.