Class MessageDispatcher

java.lang.Object
de.otto.synapse.consumer.MessageDispatcher
All Implemented Interfaces:
Consumer<TextMessage>

public class MessageDispatcher extends Object implements Consumer<TextMessage>
A MessageConsumer that is acting as a Message Dispatcher for multiple message consumers.

MessageDispatcher

As it is implementing the MessageConsumer interface, the MessageDispatcher is an implementation of the GoF Composite Pattern.

Messages are translated by the dispatcher using to the format expected by the registered consumers.

See Also:
  • Constructor Details

    • MessageDispatcher

      public MessageDispatcher()
    • MessageDispatcher

      public MessageDispatcher(List<MessageConsumer<?>> messageConsumers)
  • Method Details