Show / Hide Table of Contents

    Class DictionaryOutboundRouter<TMessage, TEndpoint>

    Routes the outbound messages to one or multiple endpoints.

    Inheritance
    object
    OutboundRouter<TMessage>
    DictionaryOutboundRouter<TMessage, TEndpoint>
    KafkaOutboundEndpointRouter<TMessage>
    MqttOutboundEndpointRouter<TMessage>
    Implements
    IOutboundRouter<TMessage>
    IOutboundRouter
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Silverback.Messaging.Outbound.Routing
    Assembly: Silverback.Integration.dll
    Syntax
    public class DictionaryOutboundRouter<TMessage, TEndpoint> : OutboundRouter<TMessage>, IOutboundRouter<TMessage>, IOutboundRouter where TEndpoint : IProducerEndpoint
    Type Parameters
    Name Description
    TMessage

    The type of the messages to be routed.

    TEndpoint

    The type of the IProducerEndpoint.

    Constructors

    | Improve this doc View source

    DictionaryOutboundRouter(RouterFunction, IReadOnlyDictionary<string, TEndpoint>)

    Initializes a new instance of the DictionaryOutboundRouter<TMessage, TEndpoint> class.

    Declaration
    public DictionaryOutboundRouter(DictionaryOutboundRouter<TMessage, TEndpoint>.RouterFunction routerFunction, IReadOnlyDictionary<string, TEndpoint> endpoints)
    Parameters
    Type Name Description
    DictionaryOutboundRouter<TMessage, TEndpoint>.RouterFunction routerFunction

    The DictionaryOutboundRouter<TMessage, TEndpoint>.RouterFunction.

    IReadOnlyDictionary<string, TEndpoint> endpoints

    The IReadOnlyDictionary<TKey, TValue> containing the endpoints and their key.

    | Improve this doc View source

    DictionaryOutboundRouter(SingleEndpointRouterFunction, IReadOnlyDictionary<string, TEndpoint>)

    Initializes a new instance of the DictionaryOutboundRouter<TMessage, TEndpoint> class.

    Declaration
    public DictionaryOutboundRouter(DictionaryOutboundRouter<TMessage, TEndpoint>.SingleEndpointRouterFunction routerFunction, IReadOnlyDictionary<string, TEndpoint> endpoints)
    Parameters
    Type Name Description
    DictionaryOutboundRouter<TMessage, TEndpoint>.SingleEndpointRouterFunction routerFunction

    The DictionaryOutboundRouter<TMessage, TEndpoint>.SingleEndpointRouterFunction.

    IReadOnlyDictionary<string, TEndpoint> endpoints

    The IReadOnlyDictionary<TKey, TValue> containing the endpoints and their key.

    Properties

    | Improve this doc View source

    Endpoints

    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
    OutboundRouter<TMessage>.Endpoints

    Methods

    | Improve this doc View source

    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.

    Overrides
    OutboundRouter<TMessage>.GetDestinationEndpoints(TMessage, MessageHeaderCollection)

    Implements

    IOutboundRouter<TMessage>
    IOutboundRouter
    • Improve this doc
    • View source
    GitHub E-Mail
    ↑ Back to top © 2020 Sergio Aquilini