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
circuitNamestringThe name of the circuit breaker.
CircuitBreakerOpenException(string, Exception)
Initializes a new instance of the CircuitBreakerOpenException class.
public CircuitBreakerOpenException(string message, Exception innerException)
Parameters
CircuitBreakerOpenException(string, TimeSpan)
Initializes a new instance of the CircuitBreakerOpenException class.
public CircuitBreakerOpenException(string circuitName, TimeSpan retryAfter)
Parameters
circuitNamestringThe name of the circuit breaker.
retryAfterTimeSpanSuggested time to wait before retrying.
Properties
CircuitName
Gets the name of the circuit breaker that rejected the operation.
public string? CircuitName { get; }
Property Value
RetryAfter
Gets or initializes the suggested time to wait before retrying, if known.
public TimeSpan? RetryAfter { get; init; }