Skip to content

Commit 5d08354

Browse files
authored
queues: fix defaults (cloudflare#6725)
Fix the default days & batching config to be correct per:
1 parent 568b538 commit 5d08354

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

content/queues/get-started.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ Published <YOUR-WORKER-NAME> (0.29 sec)
140140

141141
Copy your `*.workers.dev` subdomain and paste it into a new browser tab. Refresh the page a few times to start publishing requests to your queue. Your browser should return the `Success` response after writing the request to the queue each time.
142142

143-
You have built a queue and a producer Worker to publish messages to the queue. You will now create a consumer Worker to consume the messages published to your queue. Without a consumer Worker, the messages will stay on the queue until they expire, which defaults to five (5) days.
143+
You have built a queue and a producer Worker to publish messages to the queue. You will now create a consumer Worker to consume the messages published to your queue. Without a consumer Worker, the messages will stay on the queue until they expire, which defaults to four (4) days.
144144

145145
## 5. Create your consumer Worker
146146

@@ -188,16 +188,16 @@ To connect your queue to your consumer Worker, open your `wrangler.toml` file an
188188
# Required: this should match the name of the queue you created in step 3.
189189
# If you misspell the name, you will receive an error when attempting to publish your Worker.
190190
max_batch_size = 10 # optional: defaults to 10
191-
max_batch_timeout = 10 # optional: defaults to 3 seconds
191+
max_batch_timeout = 5 # optional: defaults to 5 seconds
192192
```
193193

194194
Replace `YOUR_QUEUE_NAME` with the queue you created in step 3.
195195

196-
In your consumer Worker, you are using queues to auto batch messages using the `max_batch_size` option and the `max_batch_timeout` option. The consumer Worker will receive messages in batches of `10` or every `10` seconds, whichever happens first.
196+
In your consumer Worker, you are using queues to auto batch messages using the `max_batch_size` option and the `max_batch_timeout` option. The consumer Worker will receive messages in batches of `10` or every `5` seconds, whichever happens first.
197197

198198
`max_batch_size` (defaults to 10) helps to reduce the amount of times your consumer Worker needs to be called. Instead of being called for every message, it will only be called after 10 messages have entered the queue.
199199

200-
`max_batch_timeout` (defaults to 3 seconds) helps to reduce wait time. If the producer Worker is not sending up to 10 messages to the queue for the consumer Worker to be called, the consumer Worker will be called every 10 seconds to receive messages that are waiting in the queue.
200+
`max_batch_timeout` (defaults to 5 seconds) helps to reduce wait time. If the producer Worker is not sending up to 10 messages to the queue for the consumer Worker to be called, the consumer Worker will be called every 10 seconds to receive messages that are waiting in the queue.
201201

202202
### Publish your consumer Worker
203203

@@ -233,4 +233,4 @@ By completing this guide, you have now created a queue, a producer Worker that p
233233

234234
## Related resources
235235

236-
* Learn more about [Cloudflare Workers](/workers/) and the applications you can build on Cloudflare.
236+
* Learn more about [Cloudflare Workers](/workers/) and the applications you can build on Cloudflare.

0 commit comments

Comments
 (0)