Class PendingMessage

java.lang.Object
org.springframework.data.redis.connection.stream.PendingMessage

public class PendingMessage extends Object
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 Details

    • PendingMessage

      public PendingMessage(RecordId id, Consumer consumer, Duration elapsedTimeSinceLastDelivery, long totalDeliveryCount)
  • Method Details

    • getId

      public RecordId getId()
      Returns:
      the message id.
    • getIdAsString

      public String getIdAsString()
      Returns:
      the message id as String.
    • getConsumer

      public Consumer getConsumer()
      The Consumer to acknowledge the message.
      Returns:
      never null.
    • getConsumerName

      public String getConsumerName()
      The consumer name to acknowledge the message.
      Returns:
      never null.
    • getGroupName

      public String getGroupName()
      Get the consumer group.
      Returns:
      never null.
    • getElapsedTimeSinceLastDelivery

      public Duration getElapsedTimeSinceLastDelivery()
      Get the elapsed time (with milliseconds precision) since the messages last delivery to the consumer.
      Returns:
      never null.
    • getTotalDeliveryCount

      public long getTotalDeliveryCount()
      Get the total number of times the messages has been delivered to the consumer.
      Returns:
      never null.
    • toString

      public String toString()
      Overrides:
      toString in class Object