Class StaticOutboundRouter
Routes all messages to a static collection of pre-defined endpoints.
Inherited Members
Namespace: Silverback.Messaging.Outbound.Routing
Assembly: Silverback.Integration.dll
Syntax
public class StaticOutboundRouter : OutboundRouter<object>, IOutboundRouter<object>, IOutboundRouter
Constructors
| Improve this doc View sourceStaticOutboundRouter(params IProducerEndpoint[])
Initializes a new instance of the StaticOutboundRouter class.
Declaration
public StaticOutboundRouter(params IProducerEndpoint[] endpoints)
Parameters
Type | Name | Description |
---|---|---|
IProducerEndpoint[] | endpoints | The endpoints to route the messages to. |
StaticOutboundRouter(IEnumerable<IProducerEndpoint>)
Initializes a new instance of the StaticOutboundRouter class.
Declaration
public StaticOutboundRouter(IEnumerable<IProducerEndpoint> endpoints)
Parameters
Type | Name | Description |
---|---|---|
IEnumerable<IProducerEndpoint> | endpoints | The endpoints to route the messages to. |
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 override IEnumerable<IProducerEndpoint> Endpoints { get; }
Property Value
Type | Description |
---|---|
IEnumerable<IProducerEndpoint> |
Overrides
Methods
| Improve this doc View sourceGetDestinationEndpoints(object, MessageHeaderCollection)
Returns the collection of IProducerEndpoint representing the endpoints where the specified message must be produced.
Declaration
public override IEnumerable<IProducerEndpoint> GetDestinationEndpoints(object message, MessageHeaderCollection headers)
Parameters
Type | Name | Description |
---|---|---|
object | message | The message to be routed. |
MessageHeaderCollection | headers | The message headers collection. |
Returns
Type | Description |
---|---|
IEnumerable<IProducerEndpoint> | The endpoints to route the message to. |
Overrides
Remarks
Always returns the endpoints provided in the constructor.