Class OutboundRouter<TMessage>
Routes the outbound messages to one or multiple outbound endpoints.
Inheritance
OutboundRouter<TMessage>
Inherited Members
Namespace: Silverback.Messaging.Outbound.Routing
Assembly: Silverback.Integration.dll
Syntax
public abstract class OutboundRouter<TMessage> : IOutboundRouter<TMessage>, IOutboundRouter
Type Parameters
Name | Description |
---|---|
TMessage | The type of the messages to be routed. |
Properties
| Improve this doc View sourceEndpoints
Gets the endpoints that are potentially targeted by this router. This collection could be built over time in case of a dynamic IOutboundRouter but that will prevent the IOutboxWorker to work properly and it's not optimal as it used for example by the health checks to ping all possible endpoints.
Declaration
public abstract IEnumerable<IProducerEndpoint> Endpoints { get; }
Property Value
Type | Description |
---|---|
IEnumerable<IProducerEndpoint> |
Methods
| Improve this doc View sourceGetDestinationEndpoints(TMessage, MessageHeaderCollection)
Returns the collection of IProducerEndpoint representing the endpoints where the specified message must be produced.
Declaration
public abstract IEnumerable<IProducerEndpoint> GetDestinationEndpoints(TMessage message, MessageHeaderCollection headers)
Parameters
Type | Name | Description |
---|---|---|
TMessage | message | The message to be routed. |
MessageHeaderCollection | headers | The message headers collection. |
Returns
Type | Description |
---|---|
IEnumerable<IProducerEndpoint> | The endpoints to route the message to. |