rebus-org / Rebus.AzureServiceBus

:bus: Azure Service Bus transport for Rebus
https://mookid.dk/category/rebus
Other
33 stars 20 forks source link

Deferred messages that encounter unhandled error when they are processed by a message handler keep being delivered indefinitely #63

Closed karelscholten closed 3 years ago

karelscholten commented 3 years ago

When I use await IBus.DeferLocal(delay, message) to deliver a message in the future, the message handler handling this message gets this message an indefinite amount of times (when the 'delay' has passed of course) when it throws an unhandled exception. I would expect it to be send to the error queue after 5 tries.

Messages that weren't deferred (IBus.Send(message)) don't have this problem. They are send to the error queue after 5 failed attempts.

Tested this in dotnet 3.1 and .net framework 4.7.2

A workaround is to downgrade to Rebus.AzureServiceBus 7.1.4.

mookid8000 commented 3 years ago

OK I've figured out now that the transport has lost the ability to dead-letter deferred messages alltogether... 😳 stay tuned, I'll fix it right away

mookid8000 commented 3 years ago

I've released a fix as Rebus.AzureServiceBus 8.0.1 – it should be available on NuGet.org in a few minutes.

Thanks for reporting this issue! 👍