Class CircuitBreakerProcessor
Implements the Circuit Breaker pattern. When consecutive failures exceed a threshold,
the circuit "opens" and routes exchanges to a fallback processor. After a reset timeout,
the circuit enters a half-open state allowing limited probing calls.
All state transitions happen under a single lock to avoid TOCTOU races.
Thread-safe for concurrent pipeline usage.
public sealed class CircuitBreakerProcessor : IProcessor
Inheritance
Implements
Properties
Methods
Process(IExchange, CancellationToken)
Processes the exchange asynchronously.
public Task Process(IExchange exchange, CancellationToken ct = default)
Constructors
CircuitBreakerProcessor(IProcessor, int, TimeSpan?, int, IProcessor?, ILogger?)
Creates a circuit breaker processor.