question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[FEATURE REQ] Support new RateLimiter API in ServiceBusProcessor

See original GitHub issue

Library 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:closed
  • Created a year ago
  • Reactions:1
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
jsquirecommented, Jul 21, 2022

Hi @markrendle. Thank you for your suggestion; this is an interesting idea that I think we’d like to look into further.

0reactions
jsquirecommented, Jul 24, 2023

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Announcing Rate Limiting for .NET - .NET Blog
Announcing built-in Rate Limiting support in .NET 7. Rate limiting provides a way to protect a resource to avoid overwhelming your app.
Read more >
envoyproxy/ratelimit: Go/gRPC service designed to enable ...
The rate limit service is a Go/gRPC service designed to enable generic rate limit scenarios from different types of applications. Applications request a...
Read more >
Microsoft Releases New .NET Rate Limiter in .NET 7
This limiter presented by Microsoft is in charge of limiting the maximum number of concurrent requests. By specifying a limit number, the ...
Read more >
API Rate Limiting with Spring Cloud Gateway
Rate limiting is a technique to control the rate by which an API or a service is consumed. In a distributed system, no...
Read more >
Rate-Limiting with Spring Boot and Resilience4j
A deep dive into the Spring Boot Resilience4j RateLimiter module, this article shows why, when and how to use it to build resilient ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found