Azure / azure-functions-servicebus-extension

Service Bus extension for Azure Functions
MIT License
65 stars 35 forks source link

Disabled Autocomplete, MessageReceivePump attempts to Abandon messages #142

Closed zamzowd closed 2 years ago

zamzowd commented 3 years ago

Even though I have autocomplete disabled and I deadlettered the message in the function, if I then throw an exception, then in addition to the logged exception I also I get a MessageLockLostException logged from MessageReceivePump.AbandonMessageIfNeeded attempting to abandon the message I already deadlettered.

So far as I know, throwing an exception is the only way that the function execution is logged as unsuccessful.

If I'm not mistaken, I think the SessionMessageProcessor on the single dispatch should check for AutoComplete before rethrowing similar to ServiceBusListener on the batch processing.

ghost commented 2 years ago

This seems to be the same issue as reported here: https://github.com/Azure/azure-webjobs-sdk/issues/2152 (it has been an issue for more than 2 years now)

alrod commented 2 years ago

it's already fixed in latest SB extension https://www.nuget.org/packages/Microsoft.Azure.WebJobs.Extensions.ServiceBus/5.3.0