Class RetryMessage

    • Constructor Detail

      • RetryMessage

        public RetryMessage​(QueueEntryId queueEntryId,
                            Exception causeForRetry,
                            Duration deliveryDelay)
        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
        Parameters:
        queueEntryId - the unique id of the message that must we will retry the delivery of
        causeForRetry - the reason why the message delivery has to be retried
        deliveryDelay - how long will the queue wait until it delivers the message to the DurableQueueConsumer
    • Method Detail

      • getQueueEntryId

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

        public Exception getCauseForRetry()
        Returns:
        the reason why the message delivery has to be retried
      • 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
      • validate

        public void validate()