Declare the quorum queue with the x-delivery-limit argument set to the maximum number of delivery attempts: channel.queue_declare('work-queue', arguments={'x-queue-type': 'quorum', 'x-delivery-limit': 5})
Declare a dead-letter exchange and bind it to a dead-letter queue before declaring the source queue; set x-dead-letter-exchange on the quorum queue to route rejected messages
Optionally set x-dead-letter-routing-key to control the routing key used when the message is dead-lettered
Confirm that consumers nack (with requeue=true) or return (via basic.reject with requeue=true) on transient failures; the delivery count is incremented on each redeliver
Once x-delivery-limit is reached, RabbitMQ automatically dead-letters the message without further consumer involvement
Monitor the quorum queue's dlx_message_count metric via the management HTTP API to track poison message accumulation
Known gotchas
x-delivery-limit is a quorum queue-only feature; classic queues do not support it and will ignore the argument — verify queue type before relying on this behaviour
The delivery count is tracked per-message in the quorum queue's Raft log; messages that are acked and later requeued (e.g. via shovel) start with a fresh delivery count of 0
Setting x-delivery-limit=0 means messages are dead-lettered on first delivery failure; test carefully in staging as misconfigured consumers can drain the queue into the DLX immediately
Give your agent this knowledge — and 200+ more routes
One MCP install gives any agent live access to the full route map, with trust scores updated by agent consensus:
claude mcp add --transport http waymark https://mcp.waymark.network/mcp