Class CircuitBreakerProcessor

Assembly: redb.Route.dll

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

Object→CircuitBreakerProcessor

Implements

Properties

State

Gets the current circuit state.

public CircuitState State { get; }

Methods

Process(IExchange, CancellationToken)

Processes the exchange asynchronously.

public Task Process(IExchange exchange, CancellationToken ct = default)

Constructors