Interface ITransportRuleBuilder<TEvent>
Builder for specifying the target transport in a routing rule.
public interface ITransportRuleBuilder<TEvent> where TEvent : IIntegrationEvent
Type Parameters
TEventThe integration event type being routed.
- Extension Methods
Methods
To(string)
Specifies the target transport for this message type.
ITransportRoutingBuilder To(string transport)
Parameters
transportstringThe transport name (e.g., "rabbitmq", "kafka", "local").
Returns
- ITransportRoutingBuilder
The parent builder for chaining additional rules.
Exceptions
- ArgumentException
Thrown when
transportis 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
predicateFunc<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
predicateis 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
Returns
- IConditionalTransportRuleBuilder<TEvent>
A conditional builder for specifying the target transport.
Exceptions
- ArgumentNullException
Thrown when
predicateis null.