Skip to content

Commit 99e00cd

Browse files
Merge pull request #126697 from Leh2/clarify-prefetch-count
Clarify that PrefetchCount must be greater than or equal to MaxConcurrentCalls
2 parents 202b9c8 + 2e2c0c5 commit 99e00cd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

articles/service-bus-messaging/service-bus-prefetch.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ You can set **prefetch_count** on the [azure.servicebus.ServiceBusReceiver](/pyt
2929
3030
While messages are available in the prefetch buffer, any subsequent receive calls are immediately fulfilled from the buffer. The buffer is replenished in the background as space becomes available. If there are no messages available for delivery, the receive operation empties the buffer and then waits or blocks, as expected.
3131

32+
It's important to note that `PrefetchCount` defines the maximum number of messages that can exist in the local buffer at any time. This also means that it acts as a strict upper limit on how many messages can be processed concurrently. If `MaxConcurrentCalls` is set higher than `PrefetchCount`, the processor will not be able to utilize all concurrent message handlers, as only up to `PrefetchCount` messages can be active in memory at once.
33+
3234
## Why is Prefetch not the default option?
3335
Prefetch speeds up the message flow by having a message readily available for local retrieval before the application asks for one. This throughput gain is the result of a trade-off that the application author must make explicitly.
3436

0 commit comments

Comments
 (0)