1

I am using azure service bus subscription and Topics for sending orders and getting orders. We have a windows app which pulls orders using web api from azure service bus subscription.

Suppose if user login and got 5 orders. If user log out from the windows app then we unlocks the messages from azure service bus. and if user logs again after 5 min or less then we are not getting all the orders from azure service bus. Its coming like 3 or 4 sometimes.

Can anyone help me on this issue, why I am not getting all the 5 orders again. I am using ReceiveBatch method of subscriptionclinet for pulling messages.

  • Could you elaborate on the 2nd paragraph? What do you mean "f user log out from the windows app then we unlocks the messages from azure service bus"? Also, when a user is logged in, are you pulling down all messages? – Sean Feldman Aug 04 '16 at 15:53
  • Hi Sean, I mean there is login/logout functionality in the windows app. When user logs in we pulls the messages from azure in peeklock method and the message lock time is set to 5 min as we need some time to process the messages. If we done with a message then we marks it complete from service bus subscription. If we not unlock messages when user logs out then we will not get the messages until those not unlocked automatically by azure. So when user logs out we manually Abandon the message from azure so other windows app user can get those messages. – Dinesh Rawat Aug 05 '16 at 06:34
  • It could also be TTL (TimeToLive) expired issue. – Adam Bartha May 09 '17 at 09:02

1 Answers1

0

I suspect you're running into a delivery count issue here. Assuming I understood correctly what you're saying, the windows app pulls the messages in a PeekLock mode. Once message is processed, you complete it. Otherwise, upon exit from the application, you abandon the messages. If you not done processing messages, and user quits, the message is abandoned while DeliveryCount is increased. Once DeliveryCount exceed the maximum set on the entity, the message is deadlettered and will not be delivered anymore.

  1. Check your MaxDeliveryCount on the entity
  2. Check you entity`s DLQ to verify if this is the behaviour
  3. In case they are DLQed, I suggest to look into centralising your DLQs for easier error handling
Sean Feldman
  • 23,443
  • 7
  • 55
  • 80