Interface QueuedMessage
-
- All Known Implementing Classes:
DefaultQueuedMessage
public interface QueuedMessageRepresents aMessagethat has been queued usingQueueMessage/QueueMessages/QueueMessageAsDeadLetterMessage
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classQueuedMessage.DeliveryMode
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description OffsetDateTimegetAddedTimestamp()When was this message first enqueued (or directly added as a Dead-letter-message)QueuedMessage.DeliveryModegetDeliveryMode()Get the message'sQueuedMessage.DeliveryModeOffsetDateTimegetDeliveryTimestamp()IfisBeingDelivered()is true, thengetDeliveryTimestamp()returns the timestamp for when the message delivery started.QueueEntryIdgetId()The unique queue entry id for this messageStringgetLastDeliveryError()Get the error from the last delivery (null if no error is recorded)MessagegetMessage()Get the message queueddefault MessageMetaDatagetMetaData()Get theMessage.getMetaData()OffsetDateTimegetNextDeliveryTimestamp()Timestamp for when the message should be delivered next time.default ObjectgetPayload()Get theMessage.getPayload()QueueNamegetQueueName()Name of the Queue that the message is enqueued onintgetRedeliveryAttempts()How many times has we attempted to re-deliver this message (same asgetTotalDeliveryAttempts()-1)intgetTotalDeliveryAttempts()Get the total number of delivery attempts for this messagebooleanisBeingDelivered()Is the message currently being delivered to a message consumerbooleanisDeadLetterMessage()Is this a poison/dead-letter message that will not be delivered untilDurableQueues.resurrectDeadLetterMessage(ResurrectDeadLetterMessage)is called
-
-
-
Method Detail
-
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()
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
default MessageMetaData 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
-
-