Quantcast
Channel: Service Bus forum
Viewing all articles
Browse latest Browse all 1916

Differences in number of messages returned from Azure service bus queue

$
0
0

Our team had interesting experience regarding receiving messages from Azure service bus queue.

We had one Azure service bus queue in Australia region which contains thousands of unlocked messages.  We ran simple console client at different machines sequentially.  Three are laptops in the same office network in NZ and one is Windows VM.  The point in the code related to interesting point is as follows.  "_client" is just an instance of "QueueClient".

- First of all, even if "messageCount" parameter is specified as 100, Azure queue returns just around 34 messages even if there are thousands of unlocked messages in the queue.

- Secondly, for no particular reason, only one laptop can manage to request 100 messages at a time and get 34.  For the rest (laptops and VM), even for the same simple console client with the same code base using "WindowsAzure.ServiceBus" nuget package (version 2.4.3.0), they can only manage to request 8 messages at a time and got 8 messages.  We don't know whey "8" is magic number but only "8" as parameter for total messages works for two laptops and one VM.  We tried out 100, 30, 10, 9 but, when console client requests Azure queue with total messages for 100, 30, 10, 9, Azure queue just returns 0 message.

// initialize QueueClient

var _client = QueueClient.CreateFromConnectionString(_connectionString, _path);

// receive a message batch

var messages = _client.ReceiveBatch(messageCount);


We saw that pattern is consistent for four machines we tested; i.e. only one laptop could manage to request a total of 100 messages even if it just got about 34 messages from Azure queue.  What could be the reason?

Thanks,

Aung


Viewing all articles
Browse latest Browse all 1916

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>