You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
description: Customize the retention period for a queue, from a minimum of 60 seconds to a maximum of 14 days.
4
+
products:
5
+
- queues
6
+
date: 2025-02-14 12:00:00 UTC
7
+
---
8
+
9
+
You can now customize a queue's message retention period, from a minimum of 60 seconds to a maximum of 14 days. Previously, it was fixed to the default of 4 days.
10
+
11
+

12
+
13
+
You can customize the retention period on the settings page for your queue, or using Wrangler:
This feature is available on all new and existing queues. If you haven't used Cloudflare Queues before, [get started with the Cloudflare Queues guide](/queues/get-started).
Copy file name to clipboardExpand all lines: src/content/docs/queues/configuration/configure-queues.mdx
+35-19Lines changed: 35 additions & 19 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,23 +9,41 @@ head:
9
9
10
10
---
11
11
12
-
import { WranglerConfig } from"~/components";
12
+
import { WranglerConfig, Type } from"~/components";
13
13
14
14
Cloudflare Queues can be configured using [Wrangler](/workers/wrangler/install-and-update/), the command-line interface for Cloudflare's Developer Platform, which includes [Workers](/workers/), [R2](/r2/), and other developer products.
15
15
16
-
Each Worker has a [Wrangler configuration file](/workers/wrangler/configuration/) that specifies environment variables, triggers, and resources, such as a Queue. To enable Worker-to-resource communication, you must set up a [binding](/workers/runtime-apis/bindings/) in your Worker project's Wrangler file.
16
+
17
+
Each Producer and Consumer Worker has a [Wrangler configuration file](/workers/wrangler/configuration/) that specifies environment variables, triggers, and resources, such as a queue. To enable Worker-to-resource communication, you must set up a [binding](/workers/runtime-apis/bindings/) in your Worker project's Wrangler file.
17
18
18
19
Use the options below to configure your queue.
19
20
20
21
:::note
21
22
22
23
23
-
Below are options for Queues, refer to the Wrangler documentation for a full reference of the [Wrangler configuration file](/workers/wrangler/configuration/).
24
+
Below are options for queues, refer to the Wrangler documentation for a full reference of the [Wrangler configuration file](/workers/wrangler/configuration/).
24
25
25
26
26
27
:::
27
28
28
-
## Producer
29
+
## Queue configuration
30
+
The following queue level settings can be configured using Wrangler:
31
+
32
+
```sh
33
+
$ npx run wrangler queues update --delivery-delay-secs 60 --message-retention-period-secs 3000
A producer is a [Cloudflare Worker](/workers/) that writes to one or more queues. A producer can accept messages over HTTP, asynchronously write messages when handling requests, and/or write to a queue from within a [Durable Object](/durable-objects/). Any Worker can write to a queue.
31
49
@@ -43,19 +61,17 @@ To produce to a queue, set up a binding in your Wrangler file. These options sho
43
61
44
62
45
63
46
-
* <code>queue</code> string
64
+
* <code>queue</code> <Typetext="string" />
47
65
48
-
* The name of the Queue.
66
+
* The name of the queue.
49
67
50
-
* <code>binding</code> string
68
+
* <code>binding</code> <Typetext="string" />
51
69
52
70
* The name of the binding, which is a JavaScript variable.
53
71
54
72
55
73
56
-
## Consumer
57
-
58
-
## Workers
74
+
## Consumer Worker Configuration
59
75
60
76
To consume messages from one or more queues, set up a binding in your Wrangler file. These options should be used when a Worker wants to receive messages from a queue.
61
77
@@ -78,32 +94,32 @@ Refer to [Limits](/queues/platform/limits) to review the maximum values for each
* The maximum number of concurrent consumers allowed to run at once. Leaving this unset will mean that the number of invocations will scale to the [currently supported maximum](/queues/platform/limits/).
109
125
* Refer to [Consumer concurrency](/queues/configuration/consumer-concurrency/) for more information on how consumers autoscale, particularly when messages are retried.
0 commit comments