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
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).
Copy file name to clipboardExpand all lines: src/content/docs/queues/configuration/configure-queues.mdx
+29-14Lines changed: 29 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,11 +9,11 @@ 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.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.
17
17
18
18
Use the options below to configure your queue.
19
19
@@ -25,7 +25,24 @@ Below are options for Queues, refer to the Wrangler documentation for a full ref
25
25
26
26
:::
27
27
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
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
48
@@ -43,19 +60,17 @@ To produce to a queue, set up a binding in your Wrangler file. These options sho
43
60
44
61
45
62
46
-
* <code>queue</code> string
63
+
* <code>queue</code> <Typetext="string" />
47
64
48
65
* The name of the Queue.
49
66
50
-
* <code>binding</code> string
67
+
* <code>binding</code> <Typetext="string" />
51
68
52
69
* The name of the binding, which is a JavaScript variable.
53
70
54
71
55
72
56
-
## Consumer
57
-
58
-
## Workers
73
+
## Consumers
59
74
60
75
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
76
@@ -78,32 +93,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
124
* Refer to [Consumer concurrency](/queues/configuration/consumer-concurrency/) for more information on how consumers autoscale, particularly when messages are retried.
0 commit comments