Recommended Free Tools
To replay dead-lettered RabbitMQ messages, transfer them from the dead-letter queue (DLQ) to the intended exchange or queue. Use RabbitMQ Shovel for a configurable queue-to-destination transfer, or a purpose-built consumer when you need filtering, transformation, or rate limits. In either case, confirm the destination accepted each message before acknowledging it in the DLQ; then verify routing and plan for duplicates.
What replay does—and what it does not do
A dead-letter exchange (DLX) routes messages that a queue dead-letters; it does not replay messages already sitting in the resulting DLQ. Replay is a separate transfer: consume messages from that queue and publish them to the destination where they should be processed.
As an Amazon Associate I earn from qualifying purchases.
RabbitMQ dead-letters messages after a consumer rejects or nacks them with requeue=false, a message TTL expires, a queue exceeds its length limit, or a quorum queue exhausts its delivery limit. Expiration of an entire queue does not, by itself, dead-letter all its messages. See RabbitMQ’s Dead Letter Exchanges documentation.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchA DLX is a normal exchange. Its bindings and routing key determine which queue receives a dead-lettered message. A configured dead-letter routing key replaces the original routing key; if none is configured, RabbitMQ uses the message’s original routing keys. A replay must account for this topology rather than assuming that sending a message to an exchange guarantees it will reach the intended queue.
#1 Best Overall
Before replay, establish why the messages failed
- Fix the underlying problem. Check the consumer, payload handling, dependencies, and destination topology. If the cause remains, replay may produce the same failure and send the messages back to a DLQ.
- Identify the DLQ and destination. Confirm the virtual host, source queue, intended exchange or queue, bindings, and routing key. Decide whether to replay everything or only a selected set.
- Inspect message history and identity. For AMQP 0-9-1, inspect
x-death; for AMQP 1.0, inspectx-opt-deaths. RabbitMQ records dead-letter history including the first and most recent queue, reason, and exchange metadata. Also review original routing keys, content type, correlation identifiers, and any application-level idempotency key. See RabbitMQ’s dead-letter header documentation. - Check for cycles. Avoid publishing into a route that leads back to the same dead-letter path. RabbitMQ can detect a dead-letter cycle and drop a message if it cycles without a rejection.
- Check queue type and broker version if delivery limits are relevant. RabbitMQ 4.0 and later use a default quorum-queue delivery limit of 20. Once that limit is exceeded, messages are dropped or dead-lettered depending on whether a DLX is configured. This default is specific to quorum queues; verify the version and queue type before diagnosing a message’s history. See RabbitMQ’s quorum queue documentation.
Choose a replay method
| Method | Best fit | Trade-offs |
|---|---|---|
| RabbitMQ Shovel | Configurable queue-to-destination transfers, including transfers within or between clusters. | Shovel is a unidirectional message pump. Its transfer and acknowledgement behavior can wait for destination publication confirmation, but routing and destination configuration still need to be correct. See Shovel Plugin and Configuring Dynamic Shovels. |
| Purpose-built consumer | Selective replay, filtering, transformation, throttling, business checks, or application-specific decisions. | Requires implementation and operational ownership. Configure manual acknowledgements, publisher confirms, retry behavior, and idempotency according to your client and application. |
| Management HTTP API | A small administrative action where a messaging client or Shovel is impractical. | RabbitMQ documents HTTP API publishing and consuming, but discourages HTTP messaging for efficiency; it also lacks protocol features such as publisher confirmations. Prefer a binary messaging protocol for normal message transfer. See RabbitMQ Management. |
Replay with RabbitMQ Shovel
Shovel consumes from a source and republishes to a destination; it can be configured dynamically. RabbitMQ describes it as “a minimalistic message pump.” Using it to drain a DLQ back to a processing route is an operational application of that documented transfer capability, not a separate built-in replay command.
- Enable and configure Shovel using RabbitMQ’s Shovel Plugin and dynamic Shovel configuration guidance. Select the DLQ as the source and the intended exchange or queue as the destination.
- Set destination routing deliberately. Confirm the destination exchange and routing key match the bindings that should receive the replayed messages. Do not assume the original routing key is correct for the destination.
- Use confirmation-aware transfer. Configure the Shovel acknowledgement behavior so the source message is acknowledged only after destination publication is confirmed. This reduces the chance of losing a message during the handoff.
- Start with a controlled transfer. Replay a small batch, then check destination queue depth and application outcomes before allowing the transfer to continue at full scale.
- Monitor and stop if behavior is wrong. Watch source and target queue depths, transfer rate, consumer errors, and renewed dead-letter growth. RabbitMQ Management exposes queue lengths and rates; its documentation is at RabbitMQ Management.
Use a custom consumer when replay needs application logic
A purpose-built consumer is more suitable when messages need selection, validation, transformation, business checks, or controlled pacing. Its transfer loop should use manual acknowledgements and publisher confirms:
Rank #2
- Consume a message from the DLQ without automatically acknowledging it.
- Apply any selection or transformation rules and publish it to the intended destination.
- Wait for the destination publisher confirmation.
- Acknowledge the source message only after confirmation. If publishing fails or confirmation is not received, do not acknowledge the source; handle retry or recovery according to the application’s policy.
Client libraries differ, so exact code and retry settings depend on the language and library in use. A confirmed publish followed by a source acknowledgement is not an exactly-once guarantee: failures between those actions can still cause a message to be delivered again. Make message processing idempotent or deduplicate using a stable business or message identifier.
Understand at-least-once dead-lettering on quorum queues
Quorum queues can be configured for at-least-once dead-lettering. In that mode, the source retains dead-lettered messages until target queues confirm receipt. RabbitMQ requires all of the following: dead-letter-strategy=at-least-once, overflow=reject-publish, and a configured DLX. This is a feature with resource costs, not a guarantee that applies to every queue type. If destinations are unavailable or reject messages, forwarding can be delayed; retries may also produce duplicates. See RabbitMQ’s quorum queue documentation.
These settings govern the automatic dead-lettering handoff from a quorum queue. They do not replace the replay procedure for messages already in a DLQ.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Configure DLX behavior with policies where practical
RabbitMQ allows a DLX to be configured through a queue policy or queue arguments. Policies are generally easier to change without redeploying applications. If both a policy and queue arguments specify the same setting, the queue arguments take precedence. Check the effective DLX and dead-letter routing key before replay, especially if the queue’s configuration has changed since the messages were dead-lettered. See Dead Letter Exchanges.
Quick Recap
Best Value
Rank #4
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




