Class RetryMessage
java.lang.Object
dk.cloudcreate.essentials.components.foundation.messaging.queue.operations.RetryMessage
Schedule the message for redelivery after the specified
Note this method MUST be called within an existing
Operation also matches
deliveryDelay (called by the DurableQueueConsumer)Note this method MUST be called within an existing
UnitOfWork IF
using TransactionalMode.FullyTransactionalOperation also matches
DurableQueuesInterceptor.intercept(RetryMessage, InterceptorChain)-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRetryMessage(QueueEntryId queueEntryId, Exception causeForRetry, Duration deliveryDelay) Schedule the message for redelivery after the specifieddeliveryDelay(called by theDurableQueueConsumer)
Note this method MUST be called within an existingUnitOfWorkIF usingTransactionalMode.FullyTransactional -
Method Summary
Modifier and TypeMethodDescriptionstatic RetryMessageBuilderbuilder()Create a new builder that produces a newRetryMessageinstancevoidsetCauseForRetry(Exception causeForRetry) voidsetDeliveryDelay(Duration deliveryDelay) toString()voidvalidate()
-
Field Details
-
queueEntryId
-
-
Constructor Details
-
RetryMessage
Schedule the message for redelivery after the specifieddeliveryDelay(called by theDurableQueueConsumer)
Note this method MUST be called within an existingUnitOfWorkIF usingTransactionalMode.FullyTransactional- Parameters:
queueEntryId- the unique id of the message that must we will retry the delivery ofcauseForRetry- the reason why the message delivery has to be retrieddeliveryDelay- how long will the queue wait until it delivers the message to theDurableQueueConsumer
-
-
Method Details
-
builder
Create a new builder that produces a newRetryMessageinstance- Returns:
- a new
RetryMessageBuilderinstance
-
getQueueEntryId
- Returns:
- the unique id of the message that must we will retry the delivery of
-
getCauseForRetry
- Returns:
- the reason why the message delivery has to be retried
-
setCauseForRetry
- Parameters:
causeForRetry- the reason why the message delivery has to be retried
-
getDeliveryDelay
- Returns:
- how long will the queue wait until it delivers the message to the
DurableQueueConsumer
-
setDeliveryDelay
- Parameters:
deliveryDelay- how long will the queue wait until it delivers the message to theDurableQueueConsumer
-
toString
-
validate
public void validate()
-