When using an Azure ServiceBus Topic Subcription with multiple competing consumers, I can only get consumers to round-robin when the SubscriptionClient's PrefetchCount not set.
When specifying any PrefetchCount > 1, then under low load, the first consumer that happened to receive a message seems to be given an affinity to messages such that ALL messages are received by only that consumer.
If I add load (i.e. throw more messages concurrently at the subscription), then other consumers do get some messages, but load is not evenly distributed.
Using a Queue (and QueueClient), messages are more-or-less evenly distributed to clients -- with any PrefetchCount.
Note:
- MaxConcurrentCalls is a a 'high' value (200)
- I'm using PeekLock mode in all cases;
- Subscriptions use a CorrelationFilter
This Topic-Subscription behavior doesn't seem correct to me...I was under the assumption that Queue and Subscription client competing consumers mechanism should be consistent.
What could I have configured incorrectly? Or is this expected behavior?