Skip to content

Commit e0dc0f6

Browse files
committed
Updated changelog date
1 parent ffa1b06 commit e0dc0f6

File tree

2 files changed

+31
-16
lines changed

2 files changed

+31
-16
lines changed

src/content/changelogs-next/2025-02-13-customize-queue-retention-period.mdx renamed to src/content/changelogs-next/2025-02-14-customize-queue-retention-period.mdx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: Customize Queue message retention periods
33
description: Customize the retention period for a queue, starting from 60 seconds to a maximum of 14 days.
44
products:
55
- queues
6-
date: 2025-02-13 12:00:00 UTC
6+
date: 2025-02-14 12:00:00 UTC
77
---
88

99
You can customize a Queue's message retention period, starting from 60s to a maximum of 14 days.
@@ -16,7 +16,7 @@ With this update, you can retain messages for up to 14 days. Or if you want your
1616

1717
You can customize the retention period on the Queues settings page on the dashboard, or using Wrangler:
1818
```bash title="Update message retention period"
19-
$ wrangler queues update my-queue --message-retention-period 5d
19+
$ wrangler queues update my-queue --message-retention-period-secs 600
2020
```
2121

2222
This feature is available on all new and existing Queues. If you haven't used Cloudflare Queues before, [get started with our guide here](/queues/get-started).

src/content/docs/queues/configuration/configure-queues.mdx

Lines changed: 29 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ head:
99

1010
---
1111

12-
import { WranglerConfig } from "~/components";
12+
import { WranglerConfig, Type } from "~/components";
1313

1414
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.
1515

16-
Each Worker has a `wrangler.toml / wrangler.json` file 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+
Producer and Consumer Workers each have a `wrangler.toml / wrangler.json` file 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.
1717

1818
Use the options below to configure your queue.
1919

@@ -25,7 +25,24 @@ Below are options for Queues, refer to the Wrangler documentation for a full ref
2525

2626
:::
2727

28-
## Producer
28+
## Queue configuration
29+
The following Queue level settings can be configured using Wrangler:
30+
31+
```sh
32+
$ npx run wrangler queues update --delivery-delay-secs 60 --message-retention-period-secs 3000
33+
```
34+
35+
* `--delivery-delay-secs` <Type text="number" /> <Type text="optional" />
36+
* How long a published message is delayed for, before it is delivered to consumers.
37+
* Must be between 0 and 43200 (12 hrs).
38+
* Defaults to 0.
39+
40+
* `--message-retention-period-secs` <Type text="number" /> <Type text="optional" />
41+
* How long messages are retained on the Queue.
42+
* Defaults to 345600 (4 days).
43+
* Must be between 60 and 1209600 (14 days)
44+
45+
## Producer worker configuration
2946

3047
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.
3148

@@ -43,19 +60,17 @@ To produce to a queue, set up a binding in your Wrangler file. These options sho
4360

4461

4562

46-
* <code>queue</code> string
63+
* <code>queue</code> <Type text="string" />
4764

4865
* The name of the Queue.
4966

50-
* <code>binding</code> string
67+
* <code>binding</code> <Type text="string" />
5168

5269
* The name of the binding, which is a JavaScript variable.
5370

5471

5572

56-
## Consumer
57-
58-
## Workers
73+
## Consumers
5974

6075
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.
6176

@@ -78,32 +93,32 @@ Refer to [Limits](/queues/platform/limits) to review the maximum values for each
7893

7994

8095

81-
* <code>queue</code> string
96+
* <code>queue</code> <Type text="string" />
8297

8398
* The name of the Queue.
8499

85-
* <code>max\_batch\_size</code> number optional
100+
* <code>max\_batch\_size</code> <Type text="number" /> <Type text="optional" />
86101

87102
* The maximum number of messages allowed in each batch.
88103
* Defaults to `10` messages.
89104

90-
* <code>max\_batch\_timeout</code> number optional
105+
* <code>max\_batch\_timeout</code> <Type text="number" /> <Type text="optional" />
91106

92107
* The maximum number of seconds to wait until a batch is full.
93108
* Defaults to `5` seconds.
94109

95-
* <code>max\_retries</code> number optional
110+
* <code>max\_retries</code> <Type text="number" /> <Type text="optional" />
96111

97112
* The maximum number of retries for a message, if it fails or [`retryAll()`](/queues/configuration/javascript-apis/#messagebatch) is invoked.
98113
* Defaults to `3` retries.
99114

100-
* <code>dead\_letter\_queue</code> string optional
115+
* <code>dead\_letter\_queue</code> <Type text="string" /> <Type text="optional" />
101116

102117
* The name of another Queue to send a message if it fails processing at least `max_retries` times.
103118
* If a `dead_letter_queue` is not defined, messages that repeatedly fail processing will eventually be discarded.
104119
* If there is no Queue with the specified name, it will be created automatically.
105120

106-
* <code>max\_concurrency</code> number optional
121+
* <code>max\_concurrency</code> <Type text="number" /> <Type text="optional" />
107122

108123
* 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/).
109124
* Refer to [Consumer concurrency](/queues/configuration/consumer-concurrency/) for more information on how consumers autoscale, particularly when messages are retried.

0 commit comments

Comments
 (0)