Class QueueMessages
java.lang.Object
dk.cloudcreate.essentials.components.foundation.messaging.queue.operations.QueueMessages
Queue multiple messages to the same queue. All the messages will receive the same
Note this method MUST be called within an existing
QueuedMessage.getNextDeliveryTimestamp()Note this method MUST be called within an existing
UnitOfWork IF
using TransactionalMode.FullyTransactional
Operation also matches DurableQueuesInterceptor.intercept(QueueMessages, InterceptorChain)-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionQueueMessages(QueueName queueName, List<? extends Message> messages, Duration deliveryDelay) Queue multiple messages to the same queue.QueueMessages(QueueName queueName, List<? extends Message> messages, Optional<Duration> deliveryDelay) Queue multiple messages to the same queue. -
Method Summary
Modifier and TypeMethodDescriptionstatic QueueMessagesBuilderbuilder()Create a new builder that produces a newQueueMessagesinstancevoidsetDeliveryDelay(Duration deliveryDelay) voidsetDeliveryDelay(Optional<Duration> deliveryDelay) voidsetMessages(List<Message> messages) toString()voidvalidate()
-
Field Details
-
queueName
-
messages
-
-
Constructor Details
-
QueueMessages
public QueueMessages(QueueName queueName, List<? extends Message> messages, Optional<Duration> deliveryDelay) Queue multiple messages to the same queue. All the messages will receive the sameQueuedMessage.getNextDeliveryTimestamp()
Note this method MUST be called within an existingUnitOfWorkIF usingTransactionalMode.FullyTransactional- Parameters:
queueName- the name of the Queue the messages will be added tomessages- the message payloads (Message/OrderedMessage)deliveryDelay- optional: how long will the queue wait until it delivers the messages to theDurableQueueConsumer
-
QueueMessages
Queue multiple messages to the same queue. All the messages will receive the sameQueuedMessage.getNextDeliveryTimestamp()
Note this method MUST be called within an existingUnitOfWorkIF usingTransactionalMode.FullyTransactional- Parameters:
queueName- the name of the Queue the messages will be added tomessages- the message payloads (Message/OrderedMessage)deliveryDelay- optional: how long will the queue wait until it delivers the messages to theDurableQueueConsumer
-
-
Method Details
-
builder
Create a new builder that produces a newQueueMessagesinstance- Returns:
- a new
QueueMessagesBuilderinstance
-
getQueueName
- Returns:
- the name of the Queue the messages will be added to
-
getMessages
- Returns:
- the message payloads (
Message/OrderedMessage)
-
getDeliveryDelay
- Returns:
- optional: how long will the queue wait until it delivers the messages to the
DurableQueueConsumer
-
setDeliveryDelay
- Parameters:
deliveryDelay- optional: how long will the queue wait until it delivers the messages to theDurableQueueConsumer
-
setDeliveryDelay
- Parameters:
deliveryDelay- optional: how long will the queue wait until it delivers the messages to theDurableQueueConsumer
-
setMessages
- Parameters:
messages- the messages being queued (Message/OrderedMessage)
-
toString
-
validate
public void validate()
-