Dead Letter Queues

Last updated Oct 12, 2026 A Dead Letter Queue (DLQ) is a common concept in a messaging system, and represents where messages are sent when a delivery failure occurs with a consumer after max_retries is reached. A Dead Letter Queue is like any other queue, and can be produced to and consumed from independently.

With Cloudflare Queues, a Dead Letter Queue is defined within your consumer configuration. Messages are delivered to the DLQ when they reach the configured retry limit for the consumer. Without a DLQ configured, messages that reach the retry limit are deleted permanently.

The DLQ must use the same jurisdiction as its source queue. If you specify a queue name that does not exist as the DLQ, Cloudflare automatically creates that queue in the same jurisdiction as the source queue.

For example, the following consumer configuration would send messages to our DLQ named "my-other-queue" after retrying delivery (by default, 3 times):

{
    "queues": {
        "consumers": [
            {
                "queue": "my-queue",
                "dead_letter_queue": "my-other-queue"
            }
        ]
    }
}
[[queues.consumers]]
queue = "my-queue"
dead_letter_queue = "my-other-queue"

You can also configure a DLQ when creating a consumer from the command-line using wrangler:

wrangler queues consumer add $QUEUE_NAME $SCRIPT_NAME --dead-letter-queue=$NAME_OF_OTHER_QUEUE

To process messages placed on your DLQ, you need to configure a consumer for that queue as you would with any other queue.

Messages delivered to a DLQ without an active consumer will persist for four (4) days before being deleted from the queue.

Was this helpful?

YesNo

On this page

Dead Letter Queues - 图1Docs

{"@context":"https://schema.org","@type":"TechArticle","@id":"https://developers.cloudflare.com/queues/configuration/dead-letter-queues/#page","headline":"Dead Letter Queues","description":"Route failed messages to a Dead Letter Queue after exceeding the retry limit.","url":"https://developers.cloudflare.com/queues/configuration/dead-letter-queues/","inLanguage":"en","image":"https://developers.cloudflare.com/queues/configuration/dead-letter-queues/og.png?v=9a3eb9e771796cfc","dateModified":"2026-10-12","publisher":{"@type":"Organization","name":"Cloudflare","description":"One platform for your apps, agents, and workforce. Build, secure, and scale without managing infrastructure","url":"https://www.cloudflare.com/","sameAs":["https://github.com/cloudflare","https://www.linkedin.com/company/cloudflare","https://x.com/cloudflare"],"logo":{"@type":"ImageObject","url":"https://developers.cloudflare.com/logo.svg"},"address":{"@type":"PostalAddress","streetAddress":"101 Townsend St","addressLocality":"San Francisco","addressRegion":"CA","postalCode":"94107","addressCountry":"US"},"contactPoint":[{"@type":"ContactPoint","contactType":"Customer Support","url":"https://support.cloudflare.com/","availableLanguage":["English"]},{"@type":"ContactPoint","contactType":"Sales","url":"https://www.cloudflare.com/contact/","availableLanguage":["English"]}]},"isPartOf":{"@type":"WebSite","@id":"https://developers.cloudflare.com/#website","name":"Cloudflare Docs","url":"https://developers.cloudflare.com/"}}


description: Send messages to Cloudflare Queues when objects in your R2 bucket change. title: Event notifications image: https://developers.cloudflare.com/r2/buckets/event-notifications/og.png?v=1e5b6563416107fe


Skip to content

Documentation Index
Fetch the complete documentation index at: https://developers.cloudflare.com/r2/llms.txt
Use this file to discover all available pages before exploring further.