Skip to content

Commit 527098c

Browse files
elithrarharshil1712
authored andcommitted
queues: make the interaction of batch size clearer (#18396)
1 parent b5c8e0d commit 527098c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/content/docs/queues/configuration/batching-retries.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,12 @@ There are two ways to configure how messages are batched. You configure batching
2020
- `max_batch_size` - The maximum size of a batch delivered to a consumer (defaults to 10 messages).
2121
- `max_batch_timeout` - the _maximum_ amount of time the queue will wait before delivering a batch to a consumer (defaults to 5 seconds)
2222

23+
:::note[Batch size configuration]
24+
2325
Both `max_batch_size` and `max_batch_timeout` work together. Whichever limit is reached first will trigger the delivery of a batch.
2426

27+
:::
28+
2529
For example, a `max_batch_size = 30` and a `max_batch_timeout = 10` means that if 30 messages are written to the queue, the consumer will deliver a batch of 30 messages. However, if it takes longer than 10 seconds for those 30 messages to be written to the queue, then the consumer will get a batch of messages that contains however many messages were on the queue at the time (somewhere between 1 and 29, in this case).
2630

2731
:::note[Empty queues]

0 commit comments

Comments
 (0)