Skip to main content

Dead Letter Queue

A dead letter queue (DLQ) is a secondary queue used in messaging systems to store messages that cannot be successfully processed or delivered by the primary system. These messages are often referred to as “dead letters” because the main system has given up on them, typically after repeated failures caused by unresponsive consumers, malformed messages, or invalid routing.

The purpose of a DLQ is simple: failure should not mean data loss. Instead of discarding a message that keeps failing, the system parks it somewhere durable where it can be inspected, fixed, and replayed.

Sending webhooks?
Svix is the enterprise-ready webhook sending service. It handles signing, retries, and delivery observability, so you can ship a reliable webhook platform in minutes instead of months. Start sending webhooks with Svix.

How a dead letter queue works​

A DLQ sits at the end of a retry pipeline. When a message fails, the system retries it, usually on an exponential backoff schedule. Only after the retry budget is exhausted does the message move to the dead letter queue, along with metadata about why it failed and how many attempts were made. From there, an operator or an automated process can examine the dead letters, fix the underlying problem, and re-drive the messages through the main pipeline.

Most messaging infrastructure has the concept built in. SQS lets you attach a dead-letter queue to any queue with a maximum receive count, RabbitMQ routes rejected or expired messages to a dead-letter exchange, and Kafka pipelines conventionally publish failing records to a separate dead-letter topic. The mechanics differ, but the contract is the same: the main queue stays healthy, and failures accumulate somewhere you can deal with them on your own schedule.

Dead letter queues in webhook systems​

In webhook services, dead letter queues improve reliability and fault tolerance on both sides of the delivery.

On the sending side, when a webhook is delivered to a subscriber’s endpoint and the subscriber fails to acknowledge it through every retry, the message lands in a DLQ instead of vanishing. This allows the webhook provider to track which messages failed, alert the subscriber, and replay the messages once the broken endpoint is fixed, which matters because the alternative is customers silently missing events.

On the receiving side, endpoints that enqueue incoming webhooks for background processing should give that internal queue a DLQ too. A malformed payload or a bug in the handler will otherwise either poison the queue, blocking everything behind it, or get dropped entirely.

Dead letter queues help ensure that important event information is not lost due to temporary failures, making them a standard component of a resilient webhook architecture. For a deeper treatment, including how to size retry budgets and when to alert on DLQ depth, see our guide on dead letter queues in webhook systems.

How dead letter queues work in managed webhook services​

In a managed webhook service, the dead letter queue is kept per endpoint. A delivery that fails every retry, typically about eight attempts over 24 hours, is parked with its payload, response codes, and attempt history while the endpoint’s other messages keep flowing. Once the receiver is fixed, an operator replays one message or every failure since a timestamp, and endpoints that keep failing are disabled automatically.

Before picking a vendor, ask for the exact retry schedule, how long dead letters are retained, whether replay works per message and in bulk by endpoint and time range, and whether a failing endpoint triggers an alert. If your events already flow through Kafka, the usual integration is a consumer on the topic that calls the service’s send API, so check that sends accept an idempotency key; otherwise a consumer restart delivers the same event twice. Svix publishes its retry schedule, keeps a per-endpoint log of failed deliveries, replays them one at a time or in bulk, and accepts an idempotency key on every send. Our guide to evaluating webhook infrastructure covers the rest of the checklist.