Azure ServiceBus queue

K S Devadoss, Vishnu Kumar 20 Reputation points
2023-12-20T13:13:33.14+00:00

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.

  1. Prefetching and ReceiveMessagesAsync

Prefetch can be up to n/3 times the number of messages processed per second, where n is the default lock duration.

  1. 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.

Azure Service Bus
Azure Service Bus
An Azure service that provides cloud messaging as a service and hybrid integration.
{count} votes

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.