Table of Contents

Interface IEndpointRoutingBuilder

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

Fluent builder for configuring endpoint routing rules.

public interface IEndpointRoutingBuilder
Extension Methods

Examples

routing.Endpoints
    .Route<OrderCreated>()
        .To("billing-service", "inventory-service")
        .When(msg => msg.Amount > 1000).AlsoTo("fraud-detection")
        .When(msg => msg.IsInternational).AlsoTo("customs-service");

Remarks

Endpoint routing determines which services should receive a message. This is the second tier of the two-tier routing architecture and supports multicast delivery to multiple endpoints.

Rules can include conditional logic based on message content, enabling content-based routing patterns like sending high-value orders to fraud detection.

Methods

GetRules()

Gets all configured endpoint rules.

IReadOnlyList<EndpointRoutingRule> GetRules()

Returns

IReadOnlyList<EndpointRoutingRule>

A read-only collection of endpoint routing rules.

Route<TMessage>()

Begins defining an endpoint routing rule for a specific message type.

IEndpointRuleBuilder<TMessage> Route<TMessage>() where TMessage : IDispatchMessage

Returns

IEndpointRuleBuilder<TMessage>

A rule builder for specifying target endpoints.

Type Parameters

TMessage

The message type to route.