Class SimpleOutboundRouter<TMessage>
Routes the outbound messages to one outbound endpoint.
Inherited Members
Namespace: Silverback.Messaging.Outbound.Routing
Assembly: Silverback.Integration.dll
Syntax
public abstract class SimpleOutboundRouter<TMessage> : OutboundRouter<TMessage>, IOutboundRouter<TMessage>, IOutboundRouter
Type Parameters
Name | Description |
---|---|
TMessage | The type of the messages to be routed. |
Methods
| Improve this doc View sourceGetDestinationEndpoint(TMessage, MessageHeaderCollection)
Returns the IProducerEndpoint representing the endpoint where the specified message
must be produced. When null
is returned, the message will not be be published.
Declaration
protected abstract IProducerEndpoint? GetDestinationEndpoint(TMessage message, MessageHeaderCollection headers)
Parameters
Type | Name | Description |
---|---|---|
TMessage | message | The message to be routed. |
MessageHeaderCollection | headers | The message headers collection. |
Returns
Type | Description |
---|---|
IProducerEndpoint | The endpoint to route the message to, or |
GetDestinationEndpoints(TMessage, MessageHeaderCollection)
Returns the collection of IProducerEndpoint representing the endpoints where the specified message must be produced.
Declaration
public override 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. |