Class PendingMessagesSummary

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

public class PendingMessagesSummary extends Object
Value Object summarizing pending messages in a consumer group. It contains the total number and ID range of pending messages for this consumer group, as well as a collection of total pending messages per consumer.
Since:
2.3
Author:
Christoph Strobl
  • Constructor Details

    • PendingMessagesSummary

      public PendingMessagesSummary(String groupName, long totalPendingMessages, Range<String> idRange, Map<String,Long> pendingMessagesPerConsumer)
  • Method Details

    • getIdRange

      public Range<String> getIdRange()
      Get the range between the smallest and greatest ID among the pending messages.
      Returns:
      never null.
    • minRecordId

      public RecordId minRecordId()
      Get the smallest ID among the pending messages.
      Returns:
      never null.
    • maxRecordId

      public RecordId maxRecordId()
      Get the greatest ID among the pending messages.
      Returns:
      never null.
    • minMessageId

      public String minMessageId()
      Get the smallest ID as String among the pending messages.
      Returns:
      never null.
    • maxMessageId

      public String maxMessageId()
      Get the greatest ID as String among the pending messages.
      Returns:
      never null.
    • getTotalPendingMessages

      public long getTotalPendingMessages()
      Get the number of total pending messages within the consumer group.
      Returns:
      never null.
    • getGroupName

      public String getGroupName()
      Returns:
      the consumer group name.
    • getPendingMessagesPerConsumer

      public Map<String,Long> getPendingMessagesPerConsumer()
      Obtain a map of every consumer in the consumer group with at least one pending message, and the number of pending messages.
      Returns:
      never null.
    • toString

      public String toString()
      Overrides:
      toString in class Object