Cloudflare Queues
Global at-least-once message queue consumed by Workers, with batching and dead letter queues.
- Provider
- cloudflare
- Kind
- Queue
- Category
- Messaging
| property | type | values | required | kind default | this component |
|---|---|---|---|---|---|
| backoff | enum | none | fixed | exponential | exponential-jitter | no | — | inherited |
| consumerType | enum | push | pull | no | push | inherited |
| deadLetterQueue | boolean | — | no | false | ▸ false |
| delivery | enum | at-most-once | at-least-once | exactly-once | yes | — | ▸ at-least-once |
| instances | integer | — | no | — | inherited |
| managed | boolean | — | no | false | ▸ true |
| maxAttempts | integer | — | no | — | ▸ 3 |
| maxBatchSize | integer | — | no | 100 | inherited |
| maxConsumerConcurrency | integer | — | no | 250 | inherited |
| maxMessageSizeKb | integer | — | no | 128 | inherited |
| maxRetentionDays | integer | — | no | 14 | inherited |
| ordering | enum | none | per-key | global | no | none | ▸ none |
| persistence | boolean | — | no | true | ▸ true |
| replay | boolean | — | no | false | ▸ false |
| retentionDays | integer | — | no | — | ▸ 1 |
| role | enum | work | dlq | retry | offline-mailbox | frontier | no | work | ▸ work |
Every rule whose selector covers this component's kind or its category. Whether a rule fires depends on the design: its properties, its edges and its groups.
A queue that receives asynchronous traffic and has no dead-letter queue either drops poison messages or retries them forever. Neither outcome leaves anything for a human to investigate.
- — all of these hold:
- — the node's `deadLetterQueue` is false
- — the node has at least one asynchronous incoming edge
A retry queue is where poison messages end up. With no dead-letter queue they are retried forever or dropped in silence, and nobody ever looks at the failed payment.
- — all of these hold:
- — the node's `role` is "retry"
- — the node's `deadLetterQueue` is false
Retrying a transient failure at full speed turns one slow dependency into a retry storm. A retry queue backs off, preferably exponentially and with jitter.
- — all of these hold:
- — the node's `role` is "retry"
- — any of these hold:
- — the node's `backoff` has no value
- — the node's `backoff` is "none"
nodes:
- { id: "queues", component: "cloudflare-queues" }# yaml-language-server: $schema=../../schema/component.schema.json # Cloudflare Queues: a global message queue consumed by Workers. "Delivery guarantees" states at # least once delivery; "Queues - Limits" gives the 24 hour default retention (up to 14 days) and the # 100 message batch, and "Dead letter queues" states no DLQ is attached until one is configured. schemaVersion: "1" type: "component" id: "cloudflare-queues" kind: "queue" provider: "cloudflare" docs: "https://developers.cloudflare.com/queues/platform/limits/" defaults: managed: true delivery: "at-least-once" ordering: "none" deadLetterQueue: false replay: false persistence: true retentionDays: 1 maxAttempts: 3 role: "work" properties: maxBatchSize: type: "integer" default: 100 maxMessageSizeKb: type: "integer" default: 128 maxConsumerConcurrency: type: "integer" default: 250 consumerType: type: "enum" values: ["push", "pull"] default: "push" maxRetentionDays: type: "integer" default: 14