Capture workflow items that fail processing after all retry attempts are exhausted. Store them safely for investigation, manual correction, and replay — never silently lose data.
Rendering diagram…
Use a dead letter queue (DLQ) when:
Rendering diagram…
Each DLQ entry should capture everything needed to understand and replay the failure:
| Field | Description | Example |
|---|---|---|
| dlq_id | Unique identifier | DLQ-2025-0042 |
| source_workflow | Which workflow sent this | Invoice Processing |
| original_payload | The complete input data | { "invoiceId": "INV-1234", "amount": 5200, ... } |
| error_message | What went wrong | "API returned 500: Internal Server Error" |
| error_code | Structured error code | HTTP_500 |
| retry_count | How many retries were attempted | 4 |
| last_retry_at | When the last retry failed | 2025-03-15T14:22:33Z |
| status | Current DLQ status | new / investigating / fixed / replayed / abandoned |
| assigned_to | Who is investigating | [email protected] |
| resolution_notes | What was done to fix it | "Vendor API was down. Replayed successfully after recovery." |
| created_on | When item entered DLQ | 2025-03-15T14:22:33Z |
| replayed_on | When item was successfully reprocessed | 2025-03-16T09:15:00Z |
After the last retry fails:
Give the ops team a dashboard (or simple list view) showing:
When the root cause is fixed, the ops team clicks "Replay":
| DLQ Status | Retention |
|---|---|
| New / Investigating | Indefinite — must be resolved |
| Replayed (success) | 90 days, then archive |
| Abandoned | 1 year, then delete |
The DLQ is not a trash can. Every item in it represents a failure that needs resolution. Set up alerts if the DLQ grows beyond a threshold (e.g., >10 items) — it might indicate a systemic problem.
Gracefully handle transient API failures by retrying with increasing delays. Essential for any workflow that calls external services.