Class ConsumerStats
-
- All Implemented Interfaces:
public final class ConsumerStatsA 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
falseor0when that call failed.
-
-
Field Summary
Fields Modifier and Type Field Description private final Stringnameprivate final Stringstreamprivate final Booleanpausedprivate final DurationpauseRemainingprivate final Longdeliveredprivate final LongdeliveredStreamSequenceprivate final LongackFloorprivate final LongackPendingprivate final Longredeliveredprivate final LongwaitingPullsprivate final Longpendingprivate final Booleanephemeralprivate final BooleanpushBound
-
Method Summary
Modifier and Type Method Description final StringgetName()The consumer's name as the server holds it final StringgetStream()The stream the consumer reads from final BooleangetPaused()Whether delivery is currently paused final DurationgetPauseRemaining()How long the pause still has to run, or nullwhen the consumer is not paused or is paused until an explicitresume()final LonggetDelivered()How many messages this consumer has been delivered. final LonggetDeliveredStreamSequence()How far into the stream delivery has reached. final LonggetAckFloor()How many messages have been acknowledged contiguously from the start final LonggetAckPending()How many delivered messages are still waiting to be acknowledged final LonggetRedelivered()How many messages have been delivered more than once final LonggetWaitingPulls()How many pull requests are parked waiting for messages final LonggetPending()How many messages the stream still holds for this consumer final BooleangetEphemeral()Whether the consumer disappears once it goes inactive final BooleangetPushBound()Whether a push subscription is currently attached -
-
Method Detail
-
getPauseRemaining
final Duration getPauseRemaining()
How long the pause still has to run, or
nullwhen the consumer is not paused or is paused until an explicitresume()
-
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
-
getPushBound
final Boolean getPushBound()
Whether a push subscription is currently attached
-
-
-
-