All Known Implementing Classes:
DefaultQueuedMessage

public interface QueuedMessage
Represents a Message that has been queued using QueueMessage/QueueMessages/QueueMessageAsDeadLetterMessage
  • Method Details

    • getId

      QueueEntryId getId()
      The unique queue entry id for this message
      Returns:
    • getQueueName

      QueueName getQueueName()
      Name of the Queue that the message is enqueued on
      Returns:
      name of the Queue that the message is enqueued on
    • getPayload

      default Object getPayload()
      Returns:
      the Message.getPayload()
    • getAddedTimestamp

      OffsetDateTime getAddedTimestamp()
      When was this message first enqueued (or directly added as a Dead-letter-message)
      Returns:
      when was this message first enqueued
    • getNextDeliveryTimestamp

      OffsetDateTime getNextDeliveryTimestamp()
      Timestamp for when the message should be delivered next time. Null if isDeadLetterMessage() is true
      Returns:
      timestamp for when the message should be delivered next time. Null if isDeadLetterMessage() is true
    • getLastDeliveryError

      String getLastDeliveryError()
      Get the error from the last delivery (null if no error is recorded)
      Returns:
      Get the error from the last delivery (null if no error is recorded)
    • isDeadLetterMessage

      boolean isDeadLetterMessage()
      Is this a poison/dead-letter message that will not be delivered until DurableQueues.resurrectDeadLetterMessage(ResurrectDeadLetterMessage) is called
      Returns:
      Is this a poison/dead-letter message
    • getTotalDeliveryAttempts

      int getTotalDeliveryAttempts()
      Get the total number of delivery attempts for this message
      Returns:
      the total number of delivery attempts for this message
    • getRedeliveryAttempts

      int getRedeliveryAttempts()
      How many times has we attempted to re-deliver this message (same as getTotalDeliveryAttempts()-1)
      Returns:
      how many times has we attempted to re-deliver this message (same as getTotalDeliveryAttempts()-1)
    • getMetaData

      default MessageMetaData getMetaData()
      Returns:
      the Message.getMetaData()
    • getMessage

      Message getMessage()
      Get the message queued
    • getDeliveryMode

      QueuedMessage.DeliveryMode getDeliveryMode()
      Get the message's QueuedMessage.DeliveryMode
      Returns:
      the message's QueuedMessage.DeliveryMode
    • isBeingDelivered

      boolean isBeingDelivered()
      Is the message currently being delivered to a message consumer
      Returns:
      s the message currently being delivered to a message consumer
    • getDeliveryTimestamp

      OffsetDateTime getDeliveryTimestamp()
      If isBeingDelivered() is true, then getDeliveryTimestamp() returns the timestamp for when the message delivery started. Otherwise, this property is null.
      Returns:
      the timestamp for when the message delivery started