-
Notifications
You must be signed in to change notification settings - Fork 4.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calls to CloseAsync on ServiceBusProcessor takes quite a lot of time to complete. #19466
Comments
Is this related to #17734 ? |
Hi @EnricoMassone, yes this is essentially the same issue. We are investigating potential solutions to improve the experience. |
Thanks. I'm going to perform some tests inside kubernetes. I still have to fully understand the impact implied by hosting the application in kubernetes having longer shutdown time. For the time being I would prefer to avoid the workaround you suggested here of tweaking the Can we expect a new release of Thanks for helping. |
Hi @EnricoMassone. Thank you for your feedback and we regret that you're experiencing difficulties. When stopping, the processor will attempt to gracefully shut down the tasks responsible for processing the associated entity. As you'd expect, a key part of the processing flow involves interacting with the Service Bus service. Unfortunately, service communication uses a timeout-based transport which does not honor cancellation. The Though the processor itself will honor the cancellation token that a stop request signals, stopping may take up to the service operation timeout depending on where in the flow of logic each the processor is when the stop is requested. Because of the lack of cancellation support at the transport level, there is no way to provide a clean shutdown without waiting for any outstanding service calls to return. As @JoshLove-msft mentioned, this is certainly not an ideal scenario nor is it the experience that we'd like to provide for the SDK. Unfortunately, in the short term, we're bound by the limitations of the transport and will be looking at ways to potentially mitigate. #19306 tracks this investigation. The long term solution will be working with the service team to find an approach to achieve cancellation support within the AMQP transport. Unfortunately, there's no timeline yet established. I'm going to close this as a duplicate of #17734, as both are discussing the same topic, and there is some additional community conversation there. Please feel free to participate in that conversation; we're happy to continue discussing there and to help as we're able. |
Hi,
I'm rewriting some code originally written by using the
Microsoft.Azure.ServiceBus
version 5.1.0, in order to adopt the newAzure.Messaging.ServiceBus
package version 7.1.0.As documented here we are using the
CloseAsync
method in order to dispose instances of theServiceBusProcessor
class.We have noticed that these calls to
CloseAsync
take quite a long time to complete: something like 1 minute or so.As a consequence, the shutdown time of our application is now much longer than before (compared to the time required when we employed the
Microsoft.Azure.ServiceBus
package under the hood).Why is that ? Is that expected ? Am I missing anything ?
Thanks for helping.
The text was updated successfully, but these errors were encountered: