Is your feature request related to a specific problem? Or an existing feature?
When using RateLimiting, rejections consistently raised RateLimiterRejectedException, which may cause performance issues. Therefore, I wish to modify the OnRejected property type in the RateLimiterStrategyOptions class to:
Func<OnRateLimiterRejectedArguments, ValueTask<bool>> This would allow it to return a bool value indicating whether handling is complete.
If true (handled) is returned, the ExecuteCore method of the RateLimiterResilienceStrategy class does not need to set the Outcome exception at the end.
🇨🇳 Chinese:
我在使用 RateLimiter 时,当被拒绝发生总是会激发一个 RateLimiterRejectedException,这可能会造成一些性能问题。
Describe the solution you'd like
I wish to modify the OnRejected property type in the RateLimiterStrategyOptions class to:
Func<OnRateLimiterRejectedArguments, ValueTask<bool>> This would allow it to return a bool value indicating whether handling is complete.
If true (handled) is returned, the ExecuteCore method of the RateLimiterResilienceStrategy class does not need to set the Outcome exception at the end.
🇨🇳 Chinese:
我希望将 RateLimiterStrategyOptions 类中的 OnRejected 属性类型改成:
Func<OnRateLimiterRejectedArguments, ValueTask<bool>> 让它返回一个 bool 值来表示是否已经处理完成,如果返回 true,则 RateLimiterResilienceStrategy 类的 ExecuteCore 方法在最后无需设置 Outcome 的异常。
Additional context
No response
Is your feature request related to a specific problem? Or an existing feature?
When using RateLimiting, rejections consistently raised
RateLimiterRejectedException, which may cause performance issues. Therefore, I wish to modify theOnRejectedproperty type in theRateLimiterStrategyOptionsclass to:Func<OnRateLimiterRejectedArguments, ValueTask<bool>>This would allow it to return aboolvalue indicating whether handling is complete.If
true(handled) is returned, theExecuteCoremethod of theRateLimiterResilienceStrategyclass does not need to set theOutcomeexception at the end.🇨🇳 Chinese:
我在使用
RateLimiter时,当被拒绝发生总是会激发一个RateLimiterRejectedException,这可能会造成一些性能问题。Describe the solution you'd like
I wish to modify the
OnRejectedproperty type in theRateLimiterStrategyOptionsclass to:Func<OnRateLimiterRejectedArguments, ValueTask<bool>>This would allow it to return aboolvalue indicating whether handling is complete.If
true(handled) is returned, theExecuteCoremethod of theRateLimiterResilienceStrategyclass does not need to set theOutcomeexception at the end.🇨🇳 Chinese:
我希望将
RateLimiterStrategyOptions类中的OnRejected属性类型改成:Func<OnRateLimiterRejectedArguments, ValueTask<bool>>让它返回一个bool值来表示是否已经处理完成,如果返回true,则RateLimiterResilienceStrategy类的ExecuteCore方法在最后无需设置Outcome的异常。Additional context
No response