Interface IRouteLifecycleListener

Assembly: redb.Route.dll

Receives lifecycle events from when routes change state.
All methods have default no-op implementations — override only what you need.

public interface IRouteLifecycleListener

Methods

OnConnectionEvent(ConnectionEvent, CancellationToken)

Fired when a supervised connection of an endpoint changes: lost, a reconnect attempt failed, restored. The

Task OnConnectionEvent(ConnectionEvent connectionEvent, CancellationToken ct)

OnContextStarted(IRouteContext, CancellationToken)

Fired after the context has started all auto-start routes.

Task OnContextStarted(IRouteContext context, CancellationToken ct)

OnContextStarting(IRouteContext, CancellationToken)

Fired before the context starts compiling and starting routes.

Task OnContextStarting(IRouteContext context, CancellationToken ct)

OnContextStopped(IRouteContext, CancellationToken)

Fired after the context has stopped all routes and cleaned up.

Task OnContextStopped(IRouteContext context, CancellationToken ct)

OnContextStopping(IRouteContext, CancellationToken)

Fired before the context begins stopping routes.

Task OnContextStopping(IRouteContext context, CancellationToken ct)

OnExchangeCompleted(string, IExchange, CancellationToken)

Fired after an exchange has been fully processed by a route and no exception propagated

Task OnExchangeCompleted(string routeId, IExchange exchange, CancellationToken ct)

OnExchangeFailed(string, IExchange, Exception, CancellationToken)

Fired when an exchange escapes a route's pipeline with an exception (error handling declined or rethrew it).

Task OnExchangeFailed(string routeId, IExchange exchange, Exception exception, CancellationToken ct)

OnExchangeReceived(string, IExchange, CancellationToken)

Fired when an exchange enters a route's pipeline, before any step runs.

Task OnExchangeReceived(string routeId, IExchange exchange, CancellationToken ct)

OnExchangeTimedOut(string, string, TimeSpan, CancellationToken)

Fired when an exchange times out (per-exchange processing timeout from Phase 5).

Task OnExchangeTimedOut(string routeId, string exchangeId, TimeSpan elapsed, CancellationToken ct)

OnRouteErrored(string, Exception, CancellationToken)

Fired when a route fails to start or encounters a fatal error.

Task OnRouteErrored(string routeId, Exception ex, CancellationToken ct)

OnRouteStarted(string, CancellationToken)

Fired after a route has been started and is processing exchanges.

Task OnRouteStarted(string routeId, CancellationToken ct)

OnRouteStopped(string, CancellationToken)

Fired after a route has been stopped.

Task OnRouteStopped(string routeId, CancellationToken ct)

OnRouteSuspending(string, CancellationToken)

Fired when a route enters the Suspending state (drain starting).

Task OnRouteSuspending(string routeId, CancellationToken ct)