Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does calling Abandon on an Azure BrokeredMessage Increment the delivery count

When I abandon a BrokeredMessage does the messages delivery count increment and hence contribute to it being put in the Dead Message Queue?

like image 669
Richard210363 Avatar asked Apr 07 '16 15:04

Richard210363


2 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.

like image 130
Erkan Demirel Avatar answered Oct 25 '22 03:10

Erkan Demirel


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

like image 41
Alex Chen-WX Avatar answered Oct 25 '22 02:10

Alex Chen-WX