rebus-org / Rebus.AzureServiceBus

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

Application crash and exits when Rebus.Exceptions.RebusApplicationException is raised #55

Closed sabbadino closed 4 years ago

sabbadino commented 4 years ago

Unhandled Exception: Rebus.Exceptions.RebusApplicationException: Could not abandon message with ID 7179773f-e1cc-4877-970f-b0eab05c9581 and lock token 7a4c77de-ff1e-459c-9c66-07b9bea3f621 ---> Microsoft.Azure.ServiceBus.ServiceBusTimeoutException: The operation did not complete within the allocated time 00:00:59.9999661 for object dispose. ---> System.TimeoutException: The operation did not complete within the allocated time 00:00:59.9999661 for object dispose. at Microsoft.Azure.Amqp.AsyncResult.End[TAsyncResult](IAsyncResult result) at Microsoft.Azure.ServiceBus.Core.MessageReceiver.<>cDisplayClass99_0.b1(IAsyncResult a) at System.Threading.Tasks.TaskFactory1.FromAsyncCoreLogic(IAsyncResult iar, Func2 endFunction, Action1 endAction, Task1 promise, Boolean requiresSynchronization) --- End of stack trace from previous location where exception was thrown --- at Microsoft.Azure.ServiceBus.Core.MessageReceiver.DisposeMessagesAsync(IEnumerable1 lockTokens, Outcome outcome) --- End of inner exception stack trace --- at Microsoft.Azure.ServiceBus.Core.MessageReceiver.DisposeMessagesAsync(IEnumerable1 lockTokens, Outcome outcome) at Microsoft.Azure.ServiceBus.RetryPolicy.RunOperation(Func1 operation, TimeSpan operationTimeout) at Microsoft.Azure.ServiceBus.RetryPolicy.RunOperation(Func1 operation, TimeSpan operationTimeout) at Microsoft.Azure.ServiceBus.Core.MessageReceiver.AbandonAsync(String lockToken, IDictionary`2 propertiesToModify) at Rebus.AzureServiceBus.AzureServiceBusTransport.<>cDisplayClass37_0.<b1>d.MoveNext() --- End of inner exception stack trace --- at Rebus.AzureServiceBus.AzureServiceBusTransport.<>c__DisplayClass37_0.<b__1>d.MoveNext() --- End of stack trace from previous location where exception was thrown --- at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state) --- End of stack trace from previous location where exception was thrown --- at System.Threading.ThreadPoolWorkQueue.Dispatch()


mookid8000 commented 4 years ago

WTF?! let me take a look!

mookid8000 commented 4 years ago

OK, I just found out that Rebus' Azure Service Bus transport would perform its abort actions (like NACKing the message) asynchronously in the background due to a misplaced async 🙄 it's fixed now in Rebus.AzureServiceBus 7.1.3, which is on NuGet.org in a few minutes.

Thanks for reporting this!