Azure ServiceBus queue
In the Microsoft document states that regarding the PrefetchCount property with 2 different things to set the values. Both the recommendation are 2 different extreme.
Prefetch can be up to n/3 times the number of messages processed per second, where n is the default lock duration.
- High-throughput queue
Set the prefetch count to 20 times the maximum processing rates of all receivers of a factory. This count reduces the number of Service Bus client protocol transmissions.
Which one is to consider in my scenario,
Say I have a 5 receivers. Each could process 132 messages per minute.
I have setting with AutoCompleteMessages is false, ReceiveMode is PeekLock and MaxConcurrentCalls is 50.
From first recommendation my PrefetchCount is
n/3 = 30/3 = 10 //n is default auto lock duration
From second recommendation my PrefetchCount is
"20 times the maximum processing rates of all receivers of a factory"
20 * 132 * 5 = 13200/Min = 220/sec
5 is the receiver
132 is each receiver processing rate /min
Note: There is no batch message published.