FAQ - Dead Letter Exchange Monitoring
Section titled “FAQ - Dead Letter Exchange Monitoring”Question
Section titled “Question”Can I monitor the dead letter exchange?
Answer
Section titled “Answer”Yes, through its dead-letter queue. A dead letter exchange (DLX) routes messages to one or more dead-letter queues, and the agent monitors those queues like any other queue: message count, share of the max length, and age of the oldest message. Set the dead-letter queue's Error count limit to 0, so the first dead-lettered message raises an alert. The agent doesn't read exchanges, so it monitors the queue, not the exchange itself.
Why Monitor Dead-Letter Queues
Section titled “Why Monitor Dead-Letter Queues”Dead-letter queues collect your delivery failures, and the message age shows how long the oldest one has waited. RabbitMQ dead-letters a message when:
- A consumer rejects it (negative acknowledgment with requeue=false)
- Its TTL expires (it waited longer than the queue's or the message's time-to-live)
- The queue's length limit is reached (the oldest messages are dead-lettered)
Without monitoring: messages collect in the dead-letter queue, and nobody sees how many orders, payments, or events failed.
With monitoring: an alert fires on the first dead-lettered message, so the team investigates before the business notices.
Configuration Strategy
Section titled “Configuration Strategy”1. Identify the Dead-Letter Queues
Section titled “1. Identify the Dead-Letter Queues”A dead letter exchange typically routes to dedicated queues, such as:
dlx.orders(orders that failed delivery)dlx.payments(rejected payment messages)dlx.events(expired events)
2. Set Strict Thresholds
Section titled “2. Set Strict Thresholds”Use Edit on the queue's Resource (see Managing RabbitMQ):
| Threshold | Value | Reasoning |
|---|---|---|
| ⚠️ Warning count | 0 messages | Any message in a dead-letter queue means a delivery failed |
| ❌ Error count | 10 messages | Many failures point to a systemic problem |
| ❌ Error age | 1 hour | A dead-lettered message nobody handled within an hour |
The age check needs the RabbitMQ Message Timestamp plugin; see Monitoring RabbitMQ.
3. Alert the Right Team
Section titled “3. Alert the Right Team”Put the dead-letter queues in a Monitor View with an Alarm Plugin for the team that owns the failing flow.
Investigation Workflow
Section titled “Investigation Workflow”When a dead-letter queue alerts:
- Check the message count and Details in Nodinite – one message or a flood
- Read the
x-deathheader in RabbitMQ's own tools – it holds the reason, the original queue, and the time - Fix the root cause – a consumer bug, a consumer that is too slow or offline, or a backlog that hit the length limit
- Decide what happens to the messages in RabbitMQ: requeue them, delete them, or archive them
Next Steps
Section titled “ Next Steps” Configuration Guide
Monitoring RabbitMQ Features
Related Topics
Section titled “ Related Topics” RabbitMQ Agent Overview
Troubleshooting Overview
FAQ - Queue Depth Thresholds