Thanks for posting your question in the Microsoft Q&A forum.
Here are some suggestions and possible solutions for improving load balancing among replicas:
Ensure that your Service Bus client is configured correctly. For better load balancing, you should use PeekLock mode (default) instead of ReceiveAndDelete and set an appropriate PrefetchCount. A higher prefetch count can improve throughput but might lead to uneven distribution if set too high.
ServiceBusClient(
connection_string,
receive_mode=ServiceBusReceiveMode.PEEK_LOCK,
prefetch_count=20,
max_concurrent_calls=10
)
Ensure the message lock duration is appropriate for your processing time. If it's too short, messages might be reprocessed by other replicas before completion.
Implement the Competing Consumers pattern correctly. Each replica should independently pull messages from the queue and Consider using multiple queues or topics with subscriptions to distribute load more evenly.
Please don't forget to close up the thread here by upvoting and accept it as an answer if it is helpful