Table of Contents

Class CircuitBreakerOpenException

Namespace
Excalibur.Dispatch.Resilience
Assembly
Excalibur.Dispatch.Abstractions.dll

Exception thrown when an operation is rejected because the circuit breaker is open.

public sealed class CircuitBreakerOpenException : ApiException, ISerializable
Inheritance
CircuitBreakerOpenException
Implements
Inherited Members
Extension Methods

Remarks

This is the canonical circuit breaker exception used across both Dispatch and Excalibur layers. It inherits from ApiException because a circuit-breaker rejection represents an operational error within the Dispatch framework.

Constructors

CircuitBreakerOpenException()

Initializes a new instance of the CircuitBreakerOpenException class.

public CircuitBreakerOpenException()

CircuitBreakerOpenException(string)

Initializes a new instance of the CircuitBreakerOpenException class.

public CircuitBreakerOpenException(string circuitName)

Parameters

circuitName string

The name of the circuit breaker.

CircuitBreakerOpenException(string, Exception)

Initializes a new instance of the CircuitBreakerOpenException class.

public CircuitBreakerOpenException(string message, Exception innerException)

Parameters

message string

The error message.

innerException Exception

The inner exception.

CircuitBreakerOpenException(string, TimeSpan)

Initializes a new instance of the CircuitBreakerOpenException class.

public CircuitBreakerOpenException(string circuitName, TimeSpan retryAfter)

Parameters

circuitName string

The name of the circuit breaker.

retryAfter TimeSpan

Suggested time to wait before retrying.

Properties

CircuitName

Gets the name of the circuit breaker that rejected the operation.

public string? CircuitName { get; }

Property Value

string

RetryAfter

Gets or initializes the suggested time to wait before retrying, if known.

public TimeSpan? RetryAfter { get; init; }

Property Value

TimeSpan?

The remaining break duration, or null if unknown.