Class ConsumerStats

  • All Implemented Interfaces:

    
    public final class ConsumerStats
    
                        

    A snapshot of everything worth monitoring about a consumer, from one server round trip.

    Replaces the six single-value monitors eu.vstoyanov.natsy.jetstream.ConsumerContext used to expose, each of which made its own call and answered false or 0 when that call failed.

    • Method Detail

      • getName

         final String getName()

        The consumer's name as the server holds it

      • getPauseRemaining

         final Duration getPauseRemaining()

        How long the pause still has to run, or null when the consumer is not paused or is paused until an explicit resume()

      • getDelivered

         final Long getDelivered()

        How many messages this consumer has been delivered. This is the consumer sequence - the count - not the stream position

      • getDeliveredStreamSequence

         final Long getDeliveredStreamSequence()

        How far into the stream delivery has reached. Larger than delivered whenever the consumer filters, or the stream holds messages it does not read

      • getAckFloor

         final Long getAckFloor()

        How many messages have been acknowledged contiguously from the start

      • getAckPending

         final Long getAckPending()

        How many delivered messages are still waiting to be acknowledged

      • getRedelivered

         final Long getRedelivered()

        How many messages have been delivered more than once

      • getWaitingPulls

         final Long getWaitingPulls()

        How many pull requests are parked waiting for messages

      • getPending

         final Long getPending()

        How many messages the stream still holds for this consumer

      • getEphemeral

         final Boolean getEphemeral()

        Whether the consumer disappears once it goes inactive