Class RoundRobinAsyncMessageDelivery

  • All Implemented Interfaces:
    MessageDelivery

    public class RoundRobinAsyncMessageDelivery
    extends java.lang.Object
    implements MessageDelivery
    An implementation of MessageDelivery that dispatches messages in a round-robin fashion, topic by topic. Each delivery is performed in a separated thread.
    Since:
    2.2
    Author:
    Fabrizio Giudici
    • Constructor Detail

      • RoundRobinAsyncMessageDelivery

        public RoundRobinAsyncMessageDelivery()
    • Method Detail

      • initialize

        public void initialize​(@Nonnull
                               SimpleMessageBus messageBusSupport)
        Initializes this object.
        Specified by:
        initialize in interface MessageDelivery
        Parameters:
        messageBusSupport - the message bus
      • deliverMessage

        public <TOPIC> void deliverMessage​(@Nonnull
                                           java.lang.Class<TOPIC> topic,
                                           @Nonnull
                                           TOPIC message)
        Delivers a message.
        Specified by:
        deliverMessage in interface MessageDelivery
        Type Parameters:
        TOPIC - the static type of the topic
        Parameters:
        topic - the dynamic type of the topic
        message - the message