Interface QueuedMessage
- All Known Implementing Classes:
DefaultQueuedMessage
public interface QueuedMessage
Represents a
Message that has been queued using QueueMessage/QueueMessages/QueueMessageAsDeadLetterMessage-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionWhen was this message first enqueued (or directly added as a Dead-letter-message)Get the message'sQueuedMessage.DeliveryModeIfisBeingDelivered()is true, thengetDeliveryTimestamp()returns the timestamp for when the message delivery started.getId()The unique queue entry id for this messageGet the error from the last delivery (null if no error is recorded)Get the message queueddefault MessageMetaDataGet theMessage.getMetaData()Timestamp for when the message should be delivered next time.default ObjectGet theMessage.getPayload()Name of the Queue that the message is enqueued onintHow many times has we attempted to re-deliver this message (same asgetTotalDeliveryAttempts()-1)intGet the total number of delivery attempts for this messagebooleanIs the message currently being delivered to a message consumerbooleanIs this a poison/dead-letter message that will not be delivered untilDurableQueues.resurrectDeadLetterMessage(ResurrectDeadLetterMessage)is called
-
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
Get theMessage.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 ifisDeadLetterMessage()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 untilDurableQueues.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 asgetTotalDeliveryAttempts()-1)- Returns:
- how many times has we attempted to re-deliver this message (same as
getTotalDeliveryAttempts()-1)
-
getMetaData
Get theMessage.getMetaData()- Returns:
- the
Message.getMetaData()
-
getMessage
Message getMessage()Get the message queued -
getDeliveryMode
QueuedMessage.DeliveryMode getDeliveryMode()Get the message'sQueuedMessage.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()IfisBeingDelivered()is true, thengetDeliveryTimestamp()returns the timestamp for when the message delivery started. Otherwise, this property is null.- Returns:
- the timestamp for when the message delivery started
-