Skip to content

[BUG] ServiceBus: retry com.microsoft:operation-cancelled errors #35511

Closed as not planned

Description

Integration test failure (ServiceBusReceiverAsyncClientIntegrationTest [peekMessage-[4] SUBSCRIPTION, true])

peeking message results in exception

{"az.sdk.message":"onLinkFlow.","connectionId":"MF_07efd4_1686945676020","linkName":"topic-28/subscriptions/subscription-session-mgmt","unsettled":0,"credits":999}
2023-06-16 20:01:16.089 [reactor-executor-137] [DEBUG] com.azure.core.amqp.implementation.RequestResponseChannel - {"az.sdk.message":"Settling message.","connectionId":"MF_07efd4_1686945676020","linkName":"topic-28/subscriptions/subscription-session-mgmt","messageId":"1"}
2023-06-16 20:01:16.089 [reactor-executor-137] [WARN] com.azure.messaging.servicebus.implementation.ManagementChannel - {"az.sdk.message":"Operation not successful.","entityPath":"topic-28/subscriptions/subscription-session","status":"INTERNAL_SERVER_ERROR","description":"The AMQP object link221576477 is aborted. Reference:2b33044a-e7c1-4288-aecc-cecd0094467e, TrackingId:91c5db7b-1ff3-489b-87c2-c9b7019cd05e_G8, SystemTracker:NoSystemTracker, Timestamp:2023-06-16T20:01:16","condition":"com.microsoft:operation-cancelled"}
2023-06-16 20:01:16.090 [reactor-executor-137] [INFO] com.azure.core.experimental.util.tracing.LoggingTracerProvider.LoggingSpan - {"az.sdk.message":"span created","traceId":"6b9751cc0d3b488ba1248d2e1ac879ca","spanId":"83c6b3c879dfe3cc","parentSpanId":"0000000000000000","name":"ServiceBus.peekMessage","kind":"CLIENT"}
2023-06-16 20:01:16.090 [reactor-executor-137] [INFO] com.azure.core.experimental.util.tracing.LoggingTracerProvider.LoggingSpan - {"az.sdk.message":"span ended","exception":"The AMQP object link221576477 is aborted. Reference:2b33044a-e7c1-4288-aecc-cecd0094467e, TrackingId:91c5db7b-1ff3-489b-87c2-c9b7019cd05e_G8, SystemTracker:NoSystemTracker, Timestamp:2023-06-16T20:01:16, errorContext[NAMESPACE: sb-java-t261a55541e684b3f.servicebus.windows.net. ERROR CONTEXT: N/A, PATH: topic-28/subscriptions/subscription-session/$management, REFERENCE_ID: topic-28/subscriptions/subscription-session-mgmt:receiver, LINK_CREDIT: 0]","traceId":"6b9751cc0d3b488ba1248d2e1ac879ca","spanId":"83c6b3c879dfe3cc","parentSpanId":"0000000000000000","name":"ServiceBus.peekMessage","kind":"CLIENT","messaging.system":"servicebus","hostname":"sb-java-t261a55541e684b3f.servicebus.windows.net","entity-path":"topic-28/subscriptions/subscription-session","messaging.operation":"receive","startTimestamp":"2023-06-16T20:01:16.070Z","status":null}

com.azure.messaging.servicebus.ServiceBusException: The AMQP object link221576477 is aborted. Reference:2b33044a-e7c1-4288-aecc-cecd0094467e, TrackingId:91c5db7b-1ff3-489b-87c2-c9b7019cd05e_G8, SystemTracker:NoSystemTracker, Timestamp:2023-06-16T20:01:16, errorContext[NAMESPACE: ***.servicebus.windows.net. ERROR CONTEXT: N/A, PATH: topic-28/subscriptions/subscription-session/$management, REFERENCE_ID: topic-28/subscriptions/subscription-session-mgmt:receiver, LINK_CREDIT: 0]
	at com.azure.messaging.servicebus.implementation.ManagementChannel.mapError(ManagementChannel.java:256)
	at reactor.core.publisher.Mono.lambda$onErrorMap$31(Mono.java:3811)
	at reactor.core.publisher.FluxOnErrorResume$ResumeSubscriber.onError(FluxOnErrorResume.java:94)
	at reactor.core.publisher.Operators$MultiSubscriptionSubscriber.onError(Operators.java:2065)
	at reactor.core.publisher.FluxHandle$HandleSubscriber.onError(FluxHandle.java:210)
	at reactor.core.publisher.FluxHandle$HandleSubscriber.onNext(FluxHandle.java:132)
	at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.complete(MonoIgnoreThen.java:292)
	at reactor.core.publisher.MonoIgnoreThen$ThenIgnoreMain.onNext(MonoIgnoreThen.java:187)
	at reactor.core.publisher.MonoCreate$DefaultMonoSink.success(MonoCreate.java:172)
	at com.azure.core.amqp.implementation.RequestResponseChannel.settleMessage(RequestResponseChannel.java:411)
	at com.azure.core.amqp.implementation.RequestResponseChannel.lambda$new$0(RequestResponseChannel.java:191)
	at reactor.core.publisher.LambdaSubscriber.onNext(LambdaSubscriber.java:160)
	at reactor.core.publisher.FluxMap$MapSubscriber.onNext(FluxMap.java:122)
	at reactor.core.publisher.FluxPeek$PeekSubscriber.onNext(FluxPeek.java:200)
	at reactor.core.publisher.EmitterProcessor.drain(EmitterProcessor.java:537)
	at reactor.core.publisher.EmitterProcessor.tryEmitNext(EmitterProcessor.java:343)
	at reactor.core.publisher.SinkManySerialized.tryEmitNext(SinkManySerialized.java:100)
	at reactor.core.publisher.InternalManySink.emitNext(InternalManySink.java:27)
	at com.azure.core.amqp.implementation.handler.ReceiveLinkHandler.onDelivery(ReceiveLinkHandler.java:173)
	at org.apache.qpid.proton.engine.BaseHandler.handle(BaseHandler.java:185)
	at org.apache.qpid.proton.engine.impl.EventImpl.dispatch(EventImpl.java:108)
	at org.apache.qpid.proton.reactor.impl.ReactorImpl.dispatch(ReactorImpl.java:324)
	at org.apache.qpid.proton.reactor.impl.ReactorImpl.process(ReactorImpl.java:291)
	at com.azure.core.amqp.implementation.ReactorExecutor.run(ReactorExecutor.java:91)
	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:68)
	at reactor.core.scheduler.SchedulerTask.call(SchedulerTask.java:28)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:750)
Caused by: com.azure.core.amqp.exception.AmqpException: The AMQP object link221576477 is aborted. Reference:2b33044a-e7c1-4288-aecc-cecd0094467e, TrackingId:91c5db7b-1ff3-489b-87c2-c9b7019cd05e_G8, SystemTracker:NoSystemTracker, Timestamp:2023-06-16T20:01:16, errorContext[NAMESPACE: ***.servicebus.windows.net. ERROR CONTEXT: N/A, PATH: topic-28/subscriptions/subscription-session/$management, REFERENCE_ID: topic-28/subscriptions/subscription-session-mgmt:receiver, LINK_CREDIT: 0]
	at com.azure.core.amqp.implementation.ExceptionUtil.toException(ExceptionUtil.java:85)
	at com.azure.messaging.servicebus.implementation.ManagementChannel.lambda$sendWithVerify$22(ManagementChannel.java:584)
	at reactor.core.publisher.FluxHandle$HandleSubscriber.onNext(FluxHandle.java:110)
	... 26 more

we treat this error as non-transient:

case OPERATION_CANCELLED:
case MESSAGE_LOCK_LOST:
case SESSION_LOCK_LOST:
case SESSION_CANNOT_BE_LOCKED:
case ENTITY_ALREADY_EXISTS:
case MESSAGE_NOT_FOUND:
case SESSION_NOT_FOUND:
isTransient = false;

but it's transient on python, js, .net

Activity

  1. github-actions commented on Jun 16, 2025

    @github-actions
    Contributor

    Hi Liudmila Molkova (@lmolkova), we deeply appreciate your input into this project. Regrettably, this issue has remained unresolved for over 2 years and inactive for 30 days, leading us to the decision to close it. We've implemented this policy to maintain the relevance of our issue queue and facilitate easier navigation for new contributors. If you still believe this topic requires attention, please feel free to create a new issue, referencing this one. Thank you for your understanding and ongoing support.

  2. locked and limited conversation to collaborators on Jun 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ClientThis issue points to a problem in the data-plane of the library.Service Bus

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions