You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -146,6 +148,44 @@ var clientInterceptor = new ConcurrencyLimitClientInterceptor(clientLimiter);
146
148
147
149
Only unary calls are limited (matching the Java implementation); streaming calls pass through. Rejected calls return `StatusCode.Unavailable`.
148
150
151
+
## Polly
152
+
153
+
Add an adaptive concurrency gate to any Polly v8 `ResiliencePipeline`. Acquire/release happens around the inner callback; successful runs feed RTT samples back into the limit algorithm.
// limiter shed the request — fall back / return 503 / etc.
180
+
}
181
+
finally
182
+
{
183
+
ResilienceContextPool.Shared.Return(ctx);
184
+
}
185
+
```
186
+
187
+
Customize the rejection exception via `ConcurrencyLimitStrategyOptions.RejectionExceptionFactory` (e.g. throw `BrokenCircuitException` so a downstream `Retry` or `Fallback` strategy reacts to it).
188
+
149
189
## Metrics
150
190
151
191
Limiters report through the `IMetricRegistry` abstraction. The default is `EmptyMetricRegistry`; implement `IMetricRegistry` to bridge to your metrics system (e.g. `System.Diagnostics.Metrics`).
0 commit comments