Table of Contents

Interface ITransportRuleBuilder<TEvent>

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

Builder for specifying the target transport in a routing rule.

public interface ITransportRuleBuilder<TEvent> where TEvent : IIntegrationEvent

Type Parameters

TEvent

The integration event type being routed.

Extension Methods

Methods

To(string)

Specifies the target transport for this message type.

ITransportRoutingBuilder To(string transport)

Parameters

transport string

The transport name (e.g., "rabbitmq", "kafka", "local").

Returns

ITransportRoutingBuilder

The parent builder for chaining additional rules.

Exceptions

ArgumentException

Thrown when transport is null or whitespace.

When(Func<TEvent, IMessageContext, bool>)

Adds a condition using the message context for evaluation.

IConditionalTransportRuleBuilder<TEvent> When(Func<TEvent, IMessageContext, bool> predicate)

Parameters

predicate Func<TEvent, IMessageContext, bool>

The condition to evaluate against the event and context.

Returns

IConditionalTransportRuleBuilder<TEvent>

A conditional builder for specifying the target transport.

Exceptions

ArgumentNullException

Thrown when predicate is null.

When(Func<TEvent, bool>)

Adds a condition that must be satisfied for this rule to match.

IConditionalTransportRuleBuilder<TEvent> When(Func<TEvent, bool> predicate)

Parameters

predicate Func<TEvent, bool>

The condition to evaluate against the event.

Returns

IConditionalTransportRuleBuilder<TEvent>

A conditional builder for specifying the target transport.

Exceptions

ArgumentNullException

Thrown when predicate is null.