1
votes

Background

I have a topic (T1) in Azure Service Bus which is getting millions of messages from the client (web app). There are 3 subscriptions (S1, S2, S3) without any filters which are created by 3 different background processes (worker roles).

Problem

When the worker roles are running, only the first subscription (S1) seems to be getting any messages at all and then rest (S2 and S3) either don't receive anything or get a fraction of them. All the subscribers are created in the same way with same exact settings and no filters.

Service Bus Explorer shows the correct message count for S1 (~100K) but for S2 and S3 the active message count is very very low (less than 10 and usually 0). It seems to me that somehow the messages are getting deleted without even getting received by the clients.

What is the best way to investigate what's wrong and why the message count does not match between the subscribers. Any suggestions on what could be wrong?

2
tehcnically without filters all the subs should get all messages. but that kinda beats the whole point of topics. after reading the messages from subscription are you deleting them. ?Aravind

2 Answers

1
votes

Check Subscriptions in question. Subscriptions support their own DefaultMessageTimeToLive. By default it is set to maximum though. Look at the the code you used to create the subscriptions, perhaps it's using QueueDescription to customize DefaultMessageTimeToLive and other values.

Also, enable EnableDeadLetteringOnMessageExpiration to see if messages are expiring or not.

Check MaxDeliveryCount. If it's too low and messages are not processed successfully, delivery count will exceed the maximum and message will be go ne or deadlettered.

In addition to that, if filtering is being up, you can find that out by enabling EnableDeadLetteringOnFilterEvaluationExceptions

If nothing helps, post a link to reproduction code in GutHub or BitBucket so that people can see what's done.

0
votes

Sounds weird. Try to define explicitly the options for the topic like DefaultMessageTimeToLive, check also the subscription client working strategy if it's ReceiveAndDelete or PeekLock.

This tutorial may help you: https://azure.microsoft.com/en-us/documentation/articles/service-bus-dotnet-how-to-use-topics-subscriptions/#how-to-receive-messages-from-a-subscription