A dead-letter queue is the quarantine path for asynchronous work. In the normal path, a broker or event runtime delivers a message, and a consumer acknowledges it after processing succeeds. A message that reaches a delivery-attempt limit, exceeds an event-age limit, or is explicitly classified as unprocessable can be sent to a DLQ instead of being retried indefinitely. The available triggers depend on the system: some brokers count receives rather than application errors, and some discard expired messages unless dead-lettering on expiration is enabled.
Configure the policy at the layer that owns delivery and retries. A message broker can observe acknowledgments, rejects, and delivery attempts; an asynchronous function runtime can observe whether an invocation succeeds. A broker's delivery DLQ does not necessarily capture an application error that occurs after the receiver has acknowledged the message. Likewise, a DLQ for asynchronous invocations does not capture synchronous errors returned to callers. When a function polls a queue through an integration, the source queue may own redelivery and dead-lettering rather than the function's asynchronous invocation settings.
For example, an order worker might retry a transient inventory API timeout with backoff, but dead-letter an order whose schema version it cannot read. If explicit dead-lettering is unavailable, the invalid order can reach the configured retry limit instead. Give transient failures enough time to clear, but bound retries so a persistent failure does not consume worker capacity or block a delivery group. With batch processing, acknowledge successful records separately if the integration supports it; otherwise, one bad record can cause the entire batch to be delivered again.
A DLQ is not a retry scheduler, a backup, or a rollback mechanism. An event may have caused side effects before it failed, and replay may deliver it again or place it after newer events. Preserve the original event ID and enough source and failure information to correlate the record with logs, since not every DLQ includes detailed error metadata. Make consumers idempotent and decide whether allowing later events to proceed is acceptable for workflows that require strict ordering.
Operate the DLQ as a queue with an owner and a runbook. Alert on new arrivals and aging backlog, and monitor failed transfers to the DLQ itself, such as those caused by permissions or payload limits. Set retention to cover the investigation window, verify when the retention clock starts, and restrict access because failed payloads can contain sensitive data. After fixing the cause, replay a small sample before redriving the backlog at a controlled rate. Correct or dispose of records that cannot be processed safely according to policy, rather than automatically feeding them back into the same failure loop.