Polly.Policy.Bulkhead C# (CSharp) Method

Bulkhead() public static method

Builds a bulkhead isolation Policy, which limits the maximum concurrency of actions executed through the policy. Imposing a maximum concurrency limits the potential of governed actions, when faulting, to bring down the system.

When an execution would cause the number of actions executing concurrently through the policy to exceed maxParallelization, the action is not executed and a BulkheadRejectedException is thrown.

maxParallelization;Value must be greater than zero.
public static Bulkhead ( int maxParallelization ) : BulkheadPolicy
maxParallelization int The maximum number of concurrent actions that may be executing through the policy.
return BulkheadPolicy
        public static BulkheadPolicy Bulkhead(int maxParallelization)
        {
            Action<Context> doNothing = _ => { };
            return Bulkhead(maxParallelization, 0, doNothing);
        }

Same methods

Policy::Bulkhead ( int maxParallelization, Action onBulkheadRejected ) : BulkheadPolicy
Policy::Bulkhead ( int maxParallelization, int maxQueuingActions ) : BulkheadPolicy
Policy::Bulkhead ( int maxParallelization, int maxQueuingActions, Action onBulkheadRejected ) : BulkheadPolicy