# Cloudflare Queues [[Cloudflare]] Queues is a managed message-queue service that integrates natively with [[Cloudflare Workers]] producers and consumers. Producers `send()` messages; consumers receive batches via a `queue()` handler, with automatic retries, dead-letter queues, and consumer concurrency control. It's the asynchronous-work primitive missing from the Workers platform. Where a Worker's request-handler runs in tens of milliseconds, a Queue consumer can take longer, retry on failure, and process messages in batches — without the producer blocking. ## Why It Matters Most non-trivial apps need asynchronous work: send the email later, generate the thumbnail later, call the third-party API later. Queues turns "later" into a binding: producer Worker calls `queue.send(payload)`, Cloudflare buffers and dispatches to the consumer Worker. No SQS, no RabbitMQ, no Redis stream to operate. ## Core Primitives - **Producer binding**: `env.MY_QUEUE.send(message)` or `sendBatch([...])` - **Consumer handler**: `async queue(batch, env) { ... }` — runs as a Worker - **Batch size + timeout**: configurable per consumer - **[[Retry pattern|Retries]]**: per-message retry count, with [[Exponential Backoff|exponential backoff]] - **Dead-letter queue**: failed messages get routed to a DLQ for inspection - **Pull-based consumers**: poll via HTTP from outside Cloudflare ## Pricing and Limits - **Workers Free** (since February 4, 2026): 10,000 operations per day, 24-hour retention - **Workers Paid**: 1M operations per month included, then $0.40 per million. Delivering one message usually costs 3 operations (write, read, delete), billed per 64 KB. Retention is 4 days by default, up to 14 - **Limits**: 128 KB per message, 5,000 messages per second per queue, batches of up to 100 messages, 250 concurrent push consumers, 15 minutes of wall-clock time per consumer invocation ## Event Subscriptions Queues is also how Cloudflare products tell you something happened. In 2026 they added events for [[Cloudflare Artifacts]] lifecycle (May), Email Sending (July, see [[Cloudflare Email Routing and Sending]]) and [[Cloudflare Browser Rendering|Browser Run]] crawls (September). Subscribe a queue, consume in a Worker. ## Common Use Cases - **Webhook processing** — accept fast, process slow - **Email/notification dispatch** in the background - **Image/video processing** — enqueue, transform, write back to [[Cloudflare R2]] - **Fan-out** — one event → N downstream tasks - **Decoupling** producers from consumers in event-driven systems ## References - Queues home: https://developers.cloudflare.com/queues/ - Pricing: https://developers.cloudflare.com/queues/platform/pricing/ - Limits: https://developers.cloudflare.com/queues/platform/limits/ - Changelog, Queues on Workers Free (2026-02-04): https://developers.cloudflare.com/changelog/post/2026-02-04-queues-free-plan/ - Changelog, Artifacts event subscriptions (2026-05-19): https://developers.cloudflare.com/changelog/post/2026-05-19-event-subscriptions/ - Changelog, Email Sending event subscriptions (2026-07-15): https://developers.cloudflare.com/changelog/post/2026-07-15-event-subscriptions/ - Changelog, Browser Run crawl event subscriptions (2026-09-25): https://developers.cloudflare.com/changelog/post/2026-09-25-crawl-event-subscriptions/ ## Related - [[Cloudflare]] - [[Cloudflare Workers]] - [[Cloudflare Pipelines]] - [[Cloudflare R2]] - [[Cloudflare Durable Objects]] - [[Cloudflare Artifacts]] - [[Cloudflare Email Routing and Sending]] - [[Cloudflare Browser Rendering|Cloudflare Browser Run]] - [[Wrangler]]