A dead letter queue (DLQ) holds messages that cannot be processed successfully, removing them from the main queue so one poison message cannot block the flow. It preserves failures for investigation. section 11.7
Route messages according to the failure:
- For invalid data, such as a missing field or malformed payload, validate before processing and route the message to the DLQ without retrying. section 11.7
- For transient failures, such as a database timeout or network blip, retry a limited number of times; route the message to the DLQ if it still fails. section 11.7
- Watch for messages accumulating in the DLQ: they can signal that bad data is being produced upstream and needs investigation. section 11.7
A poison message
A malformed event repeatedly fails in a naive worker, blocking the queue. Routing it to the DLQ preserves it for investigation while the main queue continues moving. section 11.7





