[FEATURE REQ] - Completion and Complete on ServiceBusProcessor
See original GitHub issueLibrary name
Azure.Messaging.ServiceBus
Please describe the feature.
I’m quite a big user of the TPL library because it served a lot of my issues and problematics. Is there any possibility to have any clue on what’s happening on the ServiceBusProcess instances ?
I mean, it’s possible to call “StopProcessingAsync” to stop receiving messages, but what happen if it still were messages processing asynchronously (MaxConcurrentCall > 1) ? When i try to gracefully shutdown my service, what i would do is :
- Stop Processing (stop receiving messages)
- Wait for processor messages that are still in progress in background
- Dispose Processors resources
In TPL library, what you can do is simply :
actionBlock.Complete(); // Equivalent of StopProcessingAsync on ServiceBusProcessor
await actionBlock.Completion;
Found an issue, which seems linked to my request : https://github.com/Azure/azure-sdk-for-net/issues/21869
Is it embedded in the StopProcessingAsync ? The doc doesn’t mention anything about work in progress, i can only see “The method will cause the receivers to stop receiving” not “and finish its work in progress”.
Any thoughts ?
Issue Analytics
- State:
- Created a year ago
- Comments:7 (4 by maintainers)
Top GitHub Comments
Absolutely - I will submit a PR to improve the ref docs for these methods.
Oh ok, that’s why i asked if it was “embedded” in the StopProcessingAsync. In my opinion documentation is not clear on that point and, i don’t know for other users, but you have to know that processing messages will be awaited too when you call this method.
Is that possible to add a few words in the documentation to explain that in-flight processing messages are awaited too ?