java.lang.Object
dk.cloudcreate.essentials.components.foundation.messaging.queue.operations.RetryMessage

public final class RetryMessage extends Object
Schedule the message for redelivery after the specified deliveryDelay (called by the DurableQueueConsumer)
Note this method MUST be called within an existing UnitOfWork IF using TransactionalMode.FullyTransactional
Operation also matches DurableQueuesInterceptor.intercept(RetryMessage, InterceptorChain)
  • Field Details

  • Constructor Details

  • Method Details

    • builder

      public static RetryMessageBuilder builder()
      Create a new builder that produces a new RetryMessage instance
      Returns:
      a new RetryMessageBuilder instance
    • getQueueEntryId

      public QueueEntryId getQueueEntryId()
      Returns:
      the unique id of the message that must we will retry the delivery of
    • getCauseForRetry

      public Throwable getCauseForRetry()
      Returns:
      the reason why the message delivery has to be retried (optional)
    • setCauseForRetry

      public void setCauseForRetry(Exception causeForRetry)
      Parameters:
      causeForRetry - the reason why the message delivery has to be retried
    • getDeliveryDelay

      public Duration getDeliveryDelay()
      Returns:
      how long will the queue wait until it delivers the message to the DurableQueueConsumer
    • setDeliveryDelay

      public void setDeliveryDelay(Duration deliveryDelay)
      Parameters:
      deliveryDelay - how long will the queue wait until it delivers the message to the DurableQueueConsumer
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validate

      public void validate()