Using RabbitMQ Quorum Queues for Durable High‑Availability Messaging
Deploy RabbitMQ quorum queues for durable, highly‑available messaging. This guide walks through clustering, declaring a quorum queue, enabling publisher confirms, and testing node failure and recovery while highlighting limitations and best‑practice checks.
16 Aug 2026, 08:50 UTC

Desired Outcome
Deploy a durable, highly‑available queue that survives node failures and guarantees at‑least‑once delivery by replicating every message to a majority of cluster nodes using Raft.
Prerequisites
- RabbitMQ 3.8 or newer installed on an odd‑sized cluster (3 or 5 nodes recommended).
- Cluster nodes reachable over the network; all nodes share the same Erlang cookie.
- Management plugin enabled (for API and UI checks).
- Client library that supports publisher confirms (e.g.,
pika,amqplib,RabbitMQ .NET client).
Step‑by‑Step Procedure
Cluster the nodes (if not already done). On each node run:
rabbitmqctl stop_app rabbitmqctl reset rabbitmqctl join_cluster rabbit@node1 rabbitmqctl start_appReplace
node1with the first node’s name. Verify the cluster withrabbitmqctl cluster_status.Declare a quorum queue via HTTP API. Use the management API from any node:
curl -u guest:guest -H "Content-Type: application/json" \ -XPUT http://localhost:15672/api/queues/%2F/my_quorum_queue \ -d '{"type":"quorum","durable":true,"auto_delete":false}'Check the UI or
rabbitmqctl list_queues -p /to confirm the queue appears withquorumtype andreplicas: 3(default). If you need a different replica count, add"quorum_queue_arguments":{"x-queue-mode":"lazy"}or"quorum_queue_arguments":{"x-queue-state":"replicated"}as needed.Enable publisher confirms in your client. In Python:
channel.confirm_delivery()In Node:
channel.confirmSelect()Publish messages and observe that each acknowledgment is only sent after the message is replicated to a majority of replicas.
Consume messages from any node. The consumer will receive messages only after they are present on the local replica.
Simulate a node failure by stopping one node:
rabbitmqctl stop_app # or if you want a full shutdown sudo systemctl stop rabbitmq-serverVerify that publishing and consuming continue on the remaining nodes. Use
rabbitmqctl cluster_statusto see the cluster state.Restart the failed node and let it rejoin:
sudo systemctl start rabbitmq-server rabbitmqctl join_cluster rabbit@node1The node will automatically sync the quorum queue state without manual re‑declaration.
Verification & Checks
- UI:
/#/queues/%2F/my_quorum_queueshowsType: quorumandReplicas: 3. - Command line:
rabbitmqctl list_queues -p /lists the queue withquorumtype. - Publish a message, then stop two nodes. The queue should become unavailable because the majority is lost; confirm by attempting to publish and receiving a
PRECONDITION_FAILEDerror. - After all nodes are back, publish again and verify the message is delivered.
Recovery Options
- Node restart: No manual re‑declaration needed; quorum queues re‑synchronize automatically.
- Cluster re‑balancing: If a node is removed permanently, run
rabbitmqctl forget_cluster_node rabbit@oldnodeand let the remaining nodes elect a new majority. - Upgrade path: When upgrading RabbitMQ, keep the cluster size odd and ensure all nodes are upgraded before restarting any node to avoid split‑brain scenarios.
Limitations & Practical Checklist
- Every replica stores the full queue. Large backlogs (>10M messages) can exhaust disk or memory on all nodes.
- Write throughput is bounded by the slowest replica; avoid using quorum queues for high‑volume logging.
- Network partitions that split the cluster into minority groups render the queue unavailable until connectivity is restored.
- Verify memory thresholds and
high‑watermarksettings inrabbitmq.confbefore production deployment.
Practical Checklist Before Production
- Confirm cluster size is odd and has at least 3 nodes.
- Run a staging test that stops one node, publishes, consumes, and restarts.
- Monitor
rabbitmqctl list_queues -p /forquorumtype and replica count. - Set
ha-mode: quoruminrabbitmq.confif you prefer automatic declaration for all queues. - Enable publisher confirms and consumer acknowledgments for at‑least‑once delivery.
- Document the expected failure scenarios and recovery steps for operators.
0 replies
A thoughtful contribution can make all the difference. Be the first to share one.