Package it.tidalwave.messagebus.spi
Class RoundRobinAsyncMessageDelivery
- java.lang.Object
-
- it.tidalwave.messagebus.spi.RoundRobinAsyncMessageDelivery
-
- All Implemented Interfaces:
MessageDelivery
public class RoundRobinAsyncMessageDelivery extends java.lang.Object implements MessageDelivery
An implementation ofMessageDelivery
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
Constructors Constructor Description RoundRobinAsyncMessageDelivery()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <TOPIC> void
deliverMessage(java.lang.Class<TOPIC> topic, TOPIC message)
Delivers a message.void
initialize(SimpleMessageBus messageBusSupport)
Initializes this object.
-
-
-
Method Detail
-
initialize
public void initialize(@Nonnull SimpleMessageBus messageBusSupport)
Initializes this object.- Specified by:
initialize
in interfaceMessageDelivery
- 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 interfaceMessageDelivery
- Type Parameters:
TOPIC
- the static type of the topic- Parameters:
topic
- the dynamic type of the topicmessage
- the message
-
-