在 Azure BrokeredMessage 上调用 Abandon 是否会增加传递计数

Does calling Abandon on an Azure BrokeredMessage Increment the delivery count

当我放弃 BrokeredMessage 时,消息传递计数会增加并因此导致它被放入死消息队列吗?

BrokeredMessage.Abandon() 只解锁队列中的一条消息,以便其他消费者可以找到并锁定该消息进行处理。只能在peekLock模式下工作

如果接收方应用程序由于某种原因无法处理消息,则它可以对接收到的消息调用 Abandon 方法(而不是 Complete 方法)。这会导致服务总线解锁队列中的消息,并使其可以再次被同一消费应用程序或另一个消费应用程序接收。

您可以参考这篇文章:https://azure.microsoft.com/en-us/documentation/articles/service-bus-dotnet-how-to-use-queues/了解如何从队列接收消息。

关于BorkerMessage.Abandon()的使用方法,请参考https://msdn.microsoft.com/en-us/library/azure/hh181837.aspx

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

没错。每放弃一条消息,投递计数将增加1。当它达到最大投递计数(默认为10)时,它将被发送到死队列。

以下 post 已尽一切努力处理您的情况。在这里找到它作为评论并再次添加为答案,因为它很容易被忽视。所有学分都应该转到@granadaCoder。

https://markheath.net/post/defer-processing-azure-service-bus-message