[FEATURE REQ] Support new RateLimiter API in ServiceBusProcessor
See original GitHub issueLibrary name
Azure.Messaging.ServiceBus
Please describe the feature.
Microsoft just announced the System.Threading.RateLimiting package for .NET 7, but which is also compatible with netstandard2.0
and net462
, so should be usable in the ServiceBus package.
It looks like it could be a useful alternative to the very simplistic MaxConcurrentMessages
property on ServiceBusProcessorOptions
, allowing more intelligent throttling of messages coming off the bus.
Consumers could implement custom RateLimiter
types to throttle based on domain-specific parameters and constraints.
Also, a single RateLimiter
instance could be shared between multiple ServiceBusProcessor
instances running in a single process.
Internally, the code could be refactored to using ConcurrencyRateLimiter
when MaxConcurrentMessages
is used, so everything uses RateLimiter
to keep things simple.
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:5 (5 by maintainers)
Top GitHub Comments
Hi @markrendle. Thank you for your suggestion; this is an interesting idea that I think we’d like to look into further.
After further team discussion, this is not something that we are planning to add currently, as there have been no further requests nor discussion/upvotes on the issue. We’d be happy to accept a submission for a sample and collaborate on the design for one, should there be an interest in doing so. I’m going to close this out.