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
Copy file name to clipboardExpand all lines: content/queues/get-started.md
+5-5Lines changed: 5 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -140,7 +140,7 @@ Published <YOUR-WORKER-NAME> (0.29 sec)
140
140
141
141
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.
142
142
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.
144
144
145
145
## 5. Create your consumer Worker
146
146
@@ -188,16 +188,16 @@ To connect your queue to your consumer Worker, open your `wrangler.toml` file an
188
188
# Required: this should match the name of the queue you created in step 3.
189
189
# If you misspell the name, you will receive an error when attempting to publish your Worker.
190
190
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
192
192
```
193
193
194
194
Replace `YOUR_QUEUE_NAME` with the queue you created in step 3.
195
195
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.
197
197
198
198
`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.
199
199
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.
201
201
202
202
### Publish your consumer Worker
203
203
@@ -233,4 +233,4 @@ By completing this guide, you have now created a queue, a producer Worker that p
233
233
234
234
## Related resources
235
235
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