Class RoutePolicySupport
Convenience base class for implementations.
Captures and in .
Override only the callbacks you need.
Analogous to Apache Camel's RoutePolicySupport.
public abstract class RoutePolicySupport : IRoutePolicy
Inheritance
Implements
Derived
Properties
Methods
GetMetadata()
Returns policy-specific metadata for observability (UI, API, diagnostics).
public virtual IReadOnlyDictionary<string, object>? GetMetadata()
OnExchangeBegin(IRouteContext, IExchange, CancellationToken)
Called when an exchange starts processing in this route.
public virtual Task OnExchangeBegin(IRouteContext context, IExchange exchange, CancellationToken ct)
OnExchangeDone(IRouteContext, IExchange, CancellationToken)
Called when an exchange finishes processing (success or failure).
public virtual Task OnExchangeDone(IRouteContext context, IExchange exchange, CancellationToken ct)
OnInit(IRouteContext, CompiledRoute, CancellationToken)
Called once after the route is compiled but before consumers start.
public virtual Task OnInit(IRouteContext context, CompiledRoute route, CancellationToken ct)
OnRemove(IRouteContext, CompiledRoute, CancellationToken)
Called when the route is being removed from the context (final cleanup).
public virtual Task OnRemove(IRouteContext context, CompiledRoute route, CancellationToken ct)
OnResume(IRouteContext, CompiledRoute, CancellationToken)
Called when the route is being resumed after suspension.
public virtual Task OnResume(IRouteContext context, CompiledRoute route, CancellationToken ct)
OnStart(IRouteContext, CompiledRoute, CancellationToken)
Called before the route consumer is started. Throw to prevent startup.
public virtual Task OnStart(IRouteContext context, CompiledRoute route, CancellationToken ct)
OnStop(IRouteContext, CompiledRoute, CancellationToken)
Called after the route consumer has been stopped.
public virtual Task OnStop(IRouteContext context, CompiledRoute route, CancellationToken ct)
OnSuspend(IRouteContext, CompiledRoute, CancellationToken)
Called when the route is being suspended (drain starting).
public virtual Task OnSuspend(IRouteContext context, CompiledRoute route, CancellationToken ct)