Package it.tidalwave.messagebus.spi
Class RoundRobinAsyncMessageDelivery
java.lang.Object
it.tidalwave.messagebus.spi.RoundRobinAsyncMessageDelivery
- All Implemented Interfaces:
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 Summary
-
Method Summary
Modifier and TypeMethodDescription<T> void
deliverMessage
(Class<T> topic, T message) Delivers a message.void
initialize
(SimpleMessageBus messageBusSupport) Initializes this object.
-
Constructor Details
-
RoundRobinAsyncMessageDelivery
public RoundRobinAsyncMessageDelivery()
-
-
Method Details
-
initialize
Initializes this object.- Specified by:
initialize
in interfaceMessageDelivery
- Parameters:
messageBusSupport
- the message bus
-
deliverMessage
Delivers a message.- Specified by:
deliverMessage
in interfaceMessageDelivery
- Type Parameters:
T
- the static type of the topic- Parameters:
topic
- the dynamic type of the topicmessage
- the message
-