Class CircuitBreakerDefinition

Assembly: redb.Route.dll

Scope-opener definition for the CircuitBreaker EIP.
Wraps the downstream pipeline with circuit-breaker protection.
Optionally define a fallback branch with .
Inherits the leaf DSL from ;
child steps build the main downstream pipeline.
Close with .

public class CircuitBreakerDefinition : RouteDefinitionBase<CircuitBreakerDefinition>, IRouteDefinition, IProcessorDefinition, IRouteScope, IBranchingDefinition

Inheritance

Implements

Inherited Members

Properties

Branches

The fallback body — a logical child outside Outputs (which holds the main

public IEnumerable<IProcessorDefinition> Branches { get; }

Methods

CreateProcessor(IRouteContext)

Compile this node into a runtime processor.

public override IProcessor CreateProcessor(IRouteContext context)

End()

Closes this scope and returns the parent .

public IRouteDefinition End()

EndCircuitBreaker()

Closes the CircuitBreaker scope and returns the parent route definition.

public IRouteDefinition EndCircuitBreaker()

FailureThreshold(int)

Sets the number of consecutive failures before the circuit opens (default: 5).

public CircuitBreakerDefinition FailureThreshold(int threshold)

FallBack(Action<FallbackDefinition>)

Apache Camel nested-lambda style: opens the fallback scope, runs configure

public CircuitBreakerDefinition FallBack(Action<FallbackDefinition> configure)

HalfOpenMaxCalls(int)

Sets the maximum probe calls allowed in HalfOpen state (default: 1).

public CircuitBreakerDefinition HalfOpenMaxCalls(int count)

OnFallback()

Opens the fallback scope. Build fallback steps via leaf methods,

public FallbackDefinition OnFallback()

ResetTimeout(TimeSpan)

Sets the time to wait in Open state before probing (default: 30 s).

public CircuitBreakerDefinition ResetTimeout(TimeSpan timeout)

Threshold(int)

Alias for matching the Apache Camel DSL name.

public CircuitBreakerDefinition Threshold(int threshold)