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

public class RetryMessageBuilder extends Object
Builder for RetryMessage
  • Constructor Details

    • RetryMessageBuilder

      public RetryMessageBuilder()
  • Method Details

    • setQueueEntryId

      public RetryMessageBuilder setQueueEntryId(QueueEntryId queueEntryId)
      Parameters:
      queueEntryId - the unique id of the message that must we will retry the delivery of
      Returns:
      this builder instance
    • setCauseForRetry

      public RetryMessageBuilder setCauseForRetry(Exception causeForRetry)
      Parameters:
      causeForRetry - the reason why the message delivery has to be retried
      Returns:
      this builder instance
    • setDeliveryDelay

      public RetryMessageBuilder setDeliveryDelay(Duration deliveryDelay)
      Parameters:
      deliveryDelay - how long will the queue wait until it delivers the message to the DurableQueueConsumer
      Returns:
      this builder instance
    • build

      public RetryMessage build()
      Builder an RetryMessage instance from the builder properties
      Returns:
      the RetryMessage instance