When I abandon a BrokeredMessage does the messages delivery count increment and hence contribute to it being put in the Dead Message Queue?
3 Answers
When I abandon a BrokeredMessage does the messages delivery count increment and hence contribute to it being put in the Dead Message Queue?
Yes it's exactly. Everytime you abandon a message, delivery count will be increased by 1. And when it reaches to max delivery count (which is 10 default), it will be sent to dead queue.

- 4,302
- 1
- 25
- 43
-
3For future readers. If you want a way to "abandon" that does not increment the delivery count, see the "Resubmit Message" here http://markheath.net/post/defer-processing-azure-service-bus-message The idea is basically to clone the message, complete the original message, and .send the cloned message and optionally tack on a custom property to increment your own retry count. NOT atomic, but maybe the best workaround. – granadaCoder Feb 16 '17 at 18:54
BrokeredMessage.Abandon() only unlock a message in queue so that other consumers can find and lock the message to handle. It can only work under peekLock mode.
If a receiver application is unable to process the message for some reason, then it can call the Abandon method on the received message (instead of the Complete method). This causes Service Bus to unlock the message within the queue and make it available to be received again, either by the same consuming application or by another consuming application.
You can reference this article:https://azure.microsoft.com/en-us/documentation/articles/service-bus-dotnet-how-to-use-queues/ to see How to receive messages from a queue.
About how to use BorkerMessage.Abandon(), please reference https://msdn.microsoft.com/en-us/library/azure/hh181837.aspx

- 521
- 2
- 5
-
1I don't know why this was down voted, this is actually a good answer. Thanks Alex. – Juan Apr 23 '18 at 16:20
Following post have everything can do to handle your scenario. Found this as a comment here and adding as an answer again as it could eassily go unnoticed. All Credits should go to @granadaCoder.
https://markheath.net/post/defer-processing-azure-service-bus-message

- 1,332
- 1
- 17
- 24