liveBook · Manning

Dead letter queue

As explained in Build High Value Software Systems

A queue that holds messages or work items that could not be processed successfully through the normal path.

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

How Build High Value Software Systems covers it

How deep it goes
Specifies validation, immediate routing for invalid data, limited retries for transient failures, and investigation of accumulating messages.
Examples
Uses a corrupted event with malformed data, plus database timeouts and network blips.
What you can do after
Operate queue handling by validating messages, retrying transient failures a limited number of times, and routing persistent failures to a DLQ.
How it connects
Connects queue-level jidoka with input validation, retries, poison messages, and andon signals.

Also explained in

Compare how 6 books explain dead letter queue →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Build High Value Software Systems. The section links point to the parts of the book it draws on.