Table of Contents

Interface IFallbackRoutingBuilder

Namespace
Excalibur.Dispatch.Routing.Builder
Assembly
Excalibur.Dispatch.dll

Fluent builder for configuring fallback routing behavior.

public interface IFallbackRoutingBuilder
Extension Methods

Examples

routing.Fallback
    .To("dead-letter-queue")
    .WithReason("No matching routing rules");

Remarks

Fallback routes are used when no other routing rules match a message. This provides a safety net to ensure messages are not lost and can be routed to dead-letter queues or default handlers.

Properties

Endpoint

Gets the configured fallback endpoint.

string? Endpoint { get; }

Property Value

string

The fallback endpoint name, or null if not configured.

Reason

Gets the configured fallback reason.

string? Reason { get; }

Property Value

string

The diagnostic reason, or null if not configured.

Methods

To(string)

Specifies the fallback endpoint for unrouted messages.

IFallbackRoutingBuilder To(string endpoint)

Parameters

endpoint string

The fallback endpoint name.

Returns

IFallbackRoutingBuilder

The builder for chaining.

Exceptions

ArgumentException

Thrown when endpoint is null or whitespace.

WithReason(string)

Specifies a reason to include in routing diagnostics when fallback is used.

IFallbackRoutingBuilder WithReason(string reason)

Parameters

reason string

The diagnostic reason.

Returns

IFallbackRoutingBuilder

The builder for chaining.

Exceptions

ArgumentException

Thrown when reason is null or whitespace.