Class PendingMessage
java.lang.Object
org.springframework.data.redis.connection.stream.PendingMessage
Value object representing a single pending message containing its ID, the consumer that fetched
the message and has still to acknowledge it, the time elapsed since the messages last delivery and the the total
number of times delivered.
- Since:
- 2.3
- Author:
- Christoph Strobl
-
Constructor Summary
ConstructorDescriptionPendingMessage
(RecordId id, Consumer consumer, Duration elapsedTimeSinceLastDelivery, long totalDeliveryCount) -
Method Summary
Modifier and TypeMethodDescriptionTheConsumer
to acknowledge the message.The consumer name to acknowledge the message.Get the elapsed time (with milliseconds precision) since the messages last delivery to theconsumer
.Get the consumer group.getId()
long
Get the total number of times the messages has been delivered to theconsumer
.toString()
-
Constructor Details
-
PendingMessage
-
-
Method Details
-
getId
- Returns:
- the message id.
-
getIdAsString
- Returns:
- the message id as
String
.
-
getConsumer
TheConsumer
to acknowledge the message.- Returns:
- never null.
-
getConsumerName
The consumer name to acknowledge the message.- Returns:
- never null.
-
getGroupName
Get the consumer group.- Returns:
- never null.
-
getElapsedTimeSinceLastDelivery
Get the elapsed time (with milliseconds precision) since the messages last delivery to theconsumer
.- Returns:
- never null.
-
getTotalDeliveryCount
public long getTotalDeliveryCount()Get the total number of times the messages has been delivered to theconsumer
.- Returns:
- never null.
-
toString
-