[QUERY] Service Bus - OperationCanceledException on RenewLock
See original GitHub issueQuery/Question Sometimes I got “The operation was canceled.” in my SubscriptionClient with SessionHandler. I could not find any reasons for that. Could you please describe the case?
Please let me know if I need provide more info
Microsoft.Azure.ServiceBus.ServiceBusException: at Microsoft.Azure.ServiceBus.MessageSession+<OnRenewSessionLockAsync>d__14.MoveNext (Microsoft.Azure.ServiceBus, Version=5.1.2.0, Culture=neutral, PublicKeyToken=7e34167dcc6d6d8c) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at Microsoft.Azure.ServiceBus.MessageSession+<OnRenewSessionLockInstrumentedAsync>d__18.MoveNext (Microsoft.Azure.ServiceBus, Version=5.1.2.0, Culture=neutral, PublicKeyToken=7e34167dcc6d6d8c) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at Microsoft.Azure.ServiceBus.SessionReceivePump+<RenewSessionLockTaskAsync>d__24.MoveNext (Microsoft.Azure.ServiceBus, Version=5.1.2.0, Culture=neutral, PublicKeyToken=7e34167dcc6d6d8c) Inner exception System.OperationCanceledException handled at Microsoft.Azure.ServiceBus.MessageSession+<OnRenewSessionLockAsync>d__14.MoveNext: at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at Microsoft.Azure.Amqp.AsyncResult.End (Microsoft.Azure.Amqp, Version=2.4.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35) at Microsoft.Azure.ServiceBus.Core.MessageReceiver+<>c__DisplayClass86_0.<ExecuteRequestResponseAsync>b__1 (Microsoft.Azure.ServiceBus, Version=5.1.2.0, Culture=neutral, PublicKeyToken=7e34167dcc6d6d8c) at System.Threading.Tasks.TaskFactory`1.FromAsyncCoreLogic (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at Microsoft.Azure.ServiceBus.Core.MessageReceiver+<ExecuteRequestResponseAsync>d__86.MoveNext (Microsoft.Azure.ServiceBus, Version=5.1.2.0, Culture=neutral, PublicKeyToken=7e34167dcc6d6d8c) at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification (System.Private.CoreLib, Version=5.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e) at Microsoft.Azure.ServiceBus.MessageSession+<OnRenewSessionLockAsync>d__14.MoveNext (Microsoft.Azure.ServiceBus, Version=5.1.2.0, Culture=neutral, PublicKeyToken=7e34167dcc6d6d8c)
There is similar issue with MessagePumpTaskAsync. It was fixed by ignoring the OperationCanceledException. Can I also ignore such exceptions or is it critical for RenewLock?
Environment:
- Name and version of the Library package used: Microsoft.Azure.ServiceBus 5.1.3
- Hosting platform or OS and .NET runtime version (
dotnet --info
output for .NET Core projects): 5.0.203 Windows - IDE and version : Visual Studio 16.9.6
Issue Analytics
- State:
- Created 2 years ago
- Comments:8 (7 by maintainers)
Top GitHub Comments
Hi @Marusyk. Yes; @shankarsama’s team owns the Service Bus service and the generation of the SDK that you’re asking about. Looping in a few of the other team members in case they’re available to assist.
//cc: @DorothySun216, @bainian12345, @vinaysurya, @yvgopal
Thank you for your feedback. Tagging and routing to the team best able to assist.