Use this when failed events must not be lost.
Dead Letter Queue
A dead letter queue holds events or messages that repeatedly failed processing, so they are not lost and can be inspected and replayed after the problem is fixed.
1. DLQs hold messages that failed processing.
2. Alert on any growth.
3. Inspect causes.
4. Redrive after fixes.
5. Retention long enough for investigation.
failed message → DLQ → fix → redrive
Context & applicabilityCommon mistakes · platform/version boundaries
Operational reference
Fast context before you go deeper.
Verification & Troubleshooting
Start with the observed symptom, prove the nearest boundary, and move outward only when the current state is understood.
Use the operational verification above to establish the expected state.
Capture the concrete output, symptom, packet, log or counter before changing anything.
Step 1 Verification path Verify boundary
The negative fixture should deliberately exercise risks such as duplicate delivery, out-of-order events, poison messages, schema drift, dropped acknowledgements, retry amplification and action success inferred from broker acknowledgement, choosing the cases most relevant to poison-message routing, redrive thresholds, retention, message identity and replay only after the underlying consumer failure is understood.
Step 2 Common mistakes Narrow the fault
- Nobody monitors the DLQ.
- Replaying without fixing the cause.
Evidence · 1 on this Topic
Expected observations and documentation recipes are reference material. Record actual output, device identity, scope and time before claiming a verified result.
- Holds events that failed repeatedly.
- Inspect and replay after fixing.
- Alert when it grows.
- DLQ depth and age — monitoring
- DLQ message inspection tool — analysis
- Redrive/replay procedure — recovery
ReferenceWhy it matters1 section · depth on demand
What it is
A dead letter queue (DLQ) collects messages that failed processing after retries, so they can be inspected and replayed instead of blocking the queue or being lost.
ReferenceImportant terms & boundaries2 sections · depth on demand
In depth
A dead-letter queue (DLQ) holds messages that could not be processed after the allowed number of attempts. Moving them aside keeps one bad message — malformed, referencing a deleted object, triggering a bug — from blocking the queue or being retried forever.
Operating a DLQ:
1. Alert when messages arrive in the DLQ; it should normally be empty.
2. Inspect the message and the error that caused the failures.
3. Fix the cause (bug, missing data, permission).
4. Replay the message to the main queue, or discard it with a recorded reason.
Store enough context with each dead-lettered message — original timestamps, attempt count, last error — so it can be understood days later.
Example
aws sqs receive-message --queue-url $DLQ_URL --max-number-of-messages 10
Additional reference context Scope · expected state · examples · history · terminology Open only when you need the supporting context
Verification history & basis
When and against what this Topic was checked. Later text edits do not count as a new check.
Authoritative/upstream documentation reviewed for bounded claims in Event-Driven Automation > Dead Letter Queue. Documentation verification only; this is not observed lab or production Evidence.
Basis: https://github.com/cloudevents/spec/blob/v1.0.2/cloudevents/spec.md · confidence 94%Deep reference
Healthy vs suspicious evidence
Output interpretation
For poison-message routing, redrive thresholds, retention, message identity and replay only after the underlying consumer failure is understood, prefer typed fields and stable IDs over human presentation text.