PollyBulkhead 1.0.0
dotnet add package PollyBulkhead --version 1.0.0
NuGet\Install-Package PollyBulkhead -Version 1.0.0
<PackageReference Include="PollyBulkhead" Version="1.0.0" />
<PackageVersion Include="PollyBulkhead" Version="1.0.0" />
<PackageReference Include="PollyBulkhead" />
paket add PollyBulkhead --version 1.0.0
#r "nuget: PollyBulkhead, 1.0.0"
#:package PollyBulkhead@1.0.0
#addin nuget:?package=PollyBulkhead&version=1.0.0
#tool nuget:?package=PollyBulkhead&version=1.0.0
Polly.Contrib.Bulkhead
<img src="icon.png" width="100" align="right" />
Bulkhead isolation strategy for Polly v8 resilience pipelines. Limits concurrent executions and queued actions, rejecting excess calls with BulkheadRejectedException.
Polly v8 replaced the v7 BulkheadPolicy with the more general RateLimiter strategy. This package restores the familiar bulkhead semantics — explicit max concurrency and max queue depth — as a first-class Polly v8 resilience strategy.
Install
dotnet add package Polly.Contrib.Bulkhead
Usage
Simple concurrency limit
using Polly.Contrib.Bulkhead;
var pipeline = new ResiliencePipelineBuilder()
.AddBulkhead(maxConcurrency: 10)
.Build();
await pipeline.ExecuteAsync(async ct => await CallDownstreamAsync(ct), cancellationToken);
With a queue
var pipeline = new ResiliencePipelineBuilder()
.AddBulkhead(maxConcurrency: 10, maxQueuedActions: 20)
.Build();
Calls beyond the 10 concurrent slots queue up. If the queue also fills (>20 waiting), further calls throw BulkheadRejectedException.
Full options
var pipeline = new ResiliencePipelineBuilder()
.AddBulkhead(new BulkheadStrategyOptions
{
MaxConcurrency = 10,
MaxQueuedActions = 20,
OnBulkheadRejected = args =>
{
logger.LogWarning("Bulkhead rejected call for {Operation}", args.Context.OperationKey);
return ValueTask.CompletedTask;
},
})
.Build();
Generic pipeline
var pipeline = new ResiliencePipelineBuilder<HttpResponseMessage>()
.AddBulkhead<HttpResponseMessage>(maxConcurrency: 5)
.AddRetry(...)
.Build();
Behaviour
| Scenario | Outcome |
|---|---|
| Slots available | Executes immediately |
| Slots full, queue not full | Waits in queue |
| Slots full, queue full | Throws BulkheadRejectedException |
No queuing (MaxQueuedActions = 0) |
Rejects immediately when at capacity |
Composition
Place bulkhead before retry so rejected calls don't get retried:
var pipeline = new ResiliencePipelineBuilder()
.AddBulkhead(maxConcurrency: 10) // 1. limit concurrency first
.AddRetry(...) // 2. retry transient failures
.AddCircuitBreaker(...) // 3. protect downstream
.Build();
Support
If Polly.Contrib.Bulkhead helps protect your services, consider supporting the project:
💼 Need .NET resilience help? Visit solidqualitysolutions.com for consulting and architecture services.
License
MIT
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net6.0
- Polly.Core (>= 8.7.0)
-
net8.0
- Polly.Core (>= 8.7.0)
-
net9.0
- Polly.Core (>= 8.7.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 1.0.0 | 50 | 6/23/2026 |
1.0.1: Initial NuGet release. Bulkhead isolation strategy for Polly v8 resilience pipelines. Supports net6.0, net8.0, and net9.0.