Skip to main content
Version: Next

Pulsar stats

Topic stats

The following table outlines the stats of a topic. For more details about how to get these stats, see Get stats.

note

All metrics below are reset to 0 upon broker restart, except gauges marked as "Not reset upon restart".

StatDescription
msgRateInThe sum of all local and replication publishers' publish rates (message per second).
msgThroughputInThe sum of all local and replication publishers' publish rates (byte per second).
msgRateOutThe sum of all local and replication consumers' dispatch rates (message per second).
msgThroughputOutThe sum of all local and replication consumers' dispatch rates (byte per second).
averageMsgSizeThe average size (bytes) of messages published within the last interval.
storageSizeThe sum of the ledgers' storage size for this topic. The space used to store the messages for the topic. Not reset upon restart
earliestMsgPublishTimeInBacklogsThe publish time of the earliest message in the backlog (in milliseconds). Not reset upon restart
bytesInCounterThe total bytes published to the topic.
msgInCounterThe total messages published to the topic.
bytesOutCounterThe total bytes delivered to consumers.
msgOutCounterThe total messages delivered to consumers.
msgChunkPublishedThe topics that have chunked messages published on it.
backlogSizeThe estimated total unconsumed or backlog size (in bytes). Not reset upon restart
offloadedStorageSizeSpace that is used to store the offloaded messages for the topic (in bytes). Not reset upon restart
waitingPublishersThe number of publishers waiting in a queue in exclusive access mode.
deduplicationStatusThe status of message deduplication for the topic.
topicEpochThe topic epoch or empty if not set.
filteredEntriesCountThe count of skipped entries for the topic.
nonContiguousDeletedMessagesRangesThe number of non-contiguous deleted messages ranges.
nonContiguousDeletedMessagesRangesSerializedSizeThe serialized size of non-contiguous deleted messages ranges.
ownerBrokerThe broker that owns this topic.
publishersThe list of all local publishers on the topic, ranging from zero to thousands.
subscriptionsThe list of all local subscriptions to the topic.
replicationThis section gives the stats for cross-colo replication of this topic.

Producer stats

StatDescription
producerIdThe internal identifier for this producer on this topic.
producerNameThe internal identifier for this producer, generated by the client library.
addressIP address and source port for the connection of this producer.
connectedSinceThe timestamp when this producer is created or reconnected last time.
accessModeThe type of access to the topic that the producer requires.
msgRateInThe total rate of messages (message per second) published by this publisher.
msgThroughputInThe total throughput (byte per second) of the messages published by this publisher.
averageMsgSizeThe average message size in bytes from this publisher within the last interval.
chunkedMessageRateThe total rate of chunked messages published by this publisher.
clientVersionThe client library version of this producer.
metadataThe metadata (key/value strings) associated with this publisher.

Subscription stats

StatDescription
my-subscriptionThe name of this subscription. It is defined by the client.
msgRateOutThe total rate of messages (message per second) delivered on this subscription.
msgThroughputOutThe total throughput (byte per second) delivered on this subscription.
msgBacklogThe number of messages in the subscription backlog.
typeThis subscription type.
msgRateExpiredThe rate at which messages are discarded instead of dispatched from this subscription due to TTL.
lastExpireTimestampThe timestamp of the last message expiration.
lastConsumedFlowTimestampThe timestamp of the last flow command received.
lastConsumedTimestampThe latest timestamp of all the consumed timestamps of the consumers.
lastAckedTimestampThe latest timestamp of all the acknowledged timestamps of the consumers.
msgRateRedeliverThe total rate of messages redelivered on this subscription (message per second).
chunkedMessageRateThe chunked message dispatch rate.
earliestMsgPublishTimeInBacklogThe publish time of the earliest message in the backlog for the subscription (in milliseconds). Note that this metric is not reset upon restart.
msgBacklogNoDelayedThe number of messages in the subscription backlog that do not contain the delay messages.
blockedSubscriptionOnUnackedMsgsThe flag to verify if a subscription is blocked due to reaching the threshold of unacked messages.
msgDelayedThe number of delayed messages that are currently tracked.
unackedMessagesThe number of unacknowledged messages for the subscription, where an unacknowledged message is one that has been sent to a consumer but not yet acknowledged. This field is only meaningful when using a subscription that tracks individual message acknowledgment.
activeConsumerNameThe name of the consumer that is active for single active consumer subscriptions (such as failover or exclusive).
totalMsgExpiredThe total messages expired on this subscription.
lastMarkDeleteAdvancedTimestampThe last MarkDelete position advanced timestamp.
durableWhether the subscription is durable or ephemeral (for example, from a reader).
replicatedMark that the subscription state is kept in sync across different regions.
allowOutOfOrderDeliveryWhether out-of-order delivery is allowed on the Key_Shared subscription.
keySharedModeThe options of the Key_Shared subscription mode include AUTO_SPLIT or STICKY.
consumersAfterMarkDeletePositionGet recentJoinedConsumers for the Key_Shared subscription.
filterProcessedMsgCountThe number of messages processed by EntryFilter.
filterAcceptedMsgCountThe number of messages accepted by EntryFilter.
filterRejectedMsgCountThe number of messages rejected by EntryFilter.
filterRescheduledMsgCountThe number of messages rescheduled by EntryFilter.
bytesOutCounterThe total bytes delivered to a consumer.
msgOutCounterThe total messages delivered to a consumer.
backlogSizeThe size of backlog for this subscription (in bytes). Note that this metric is not reset upon restart.
nonContiguousDeletedMessagesRangesThe number of non-contiguous deleted messages ranges.
nonContiguousDeletedMessagesRangesSerializedSizeThe serialized size of non-contiguous deleted messages ranges.
consumersThe list of connected consumers for this subscription.

Consumer stats

StatDescription
consumerNameInternal identifier for this consumer, generated by the client library.
msgRateOutThe total rate of messages (message per second) delivered to the consumer.
msgThroughputOutThe total throughput (byte per second) delivered to the consumer.
availablePermitsThe number of messages that the consumer has space for in the client library's listening queue. 0 means the client library's queue is full and receive() isn't called. A non-zero value means this consumer is ready for dispatched messages.
unackedMessagesThe number of unacknowledged messages for the consumer, where an unacknowledged message has been sent to the consumer but not yet acknowledged. This field is only meaningful when using a subscription that tracks individual message acknowledgment.
blockedConsumerOnUnackedMsgsThe flag used to verify if the consumer is blocked due to reaching the threshold of the unacknowledged messages.
lastConsumedTimestamp (Deprecated)The timestamp when the consumer reads a message the last time.
lastConsumedTimeThe time when the consumer reads a message the last time.
lastAckedTimestamp (Deprecated)The timestamp when the consumer acknowledges a message the last time.
lastAckedTimeThe time when the consumer acknowledges a message the last time.
addressThe IP address and source port for the connection of this consumer.
connectedSinceThe timestamp when this consumer is created or reconnected last time.
clientVersionThe client library version of this consumer.
bytesOutCounterThe total bytes delivered to a consumer.
msgOutCounterThe total messages delivered to a consumer.
msgRateRedeliverThe total rate of messages redelivered by this consumer (message per second).
chunkedMessageRateThe total rate of chunked messages delivered to this consumer.
avgMessagesPerEntryThe number of average messages per entry for the consumer consumed.
readPositionWhenJoiningThe read position of the cursor when the consumer joins.
keyHashRangesThe hash ranges assigned to this consumer if it uses Key_Shared sub mode.
metadataThe metadata (key/value strings) associated with this consumer.

Replication stats

StatDescription
msgRateInThe total rate (message per second) of messages received from the remote cluster.
msgThroughputInThe total throughput (byte per second) received from the remote cluster.
msgRateOutThe total rate of messages (message per second) delivered to the replication-subscriber.
msgThroughputOutThe total throughput (byte per second) delivered to the replication-subscriber.
msgRateExpiredThe total rate of messages (message per second) expired.
replicationBacklogThe number of messages pending to be replicated to remote cluster.
connectedWhether the outbound replicator is connected.
replicationDelayInSecondsHow long the oldest message has been waiting to be sent through the connection when connected.
inboundConnectionThe IP and port of the broker in the remote cluster's publisher connection to this broker.
inboundConnectedSinceThe TCP connection used to publish messages to the remote cluster. If no local publishers are connected, this connection is automatically closed after a minute.
outboundConnectionThe address of the outbound replication connection.
outboundConnectedSinceThe timestamp of establishing an outbound connection.

Topic internal stats

The following table outlines the internal stats inside a topic. For more details about how to get these stats, see Get stats.

StatDescription
entriesAddedCounterMessages published since this broker loads this topic.
numberOfEntriesThe total number of messages tracked.
totalSizeThe total storage size in bytes of all messages.
currentLedgerEntriesThe count of messages written to the ledger that is currently open for writing.
currentLedgerSizeThe size in bytes of messages written to the ledger that is currently open for writing.
lastLedgerCreatedTimestampThe time when the last ledger is created.
lastLedgerCreationFailureTimestampThe time when the last ledger is failed.
waitingCursorsCountThe number of cursors that are caught up and waiting for a new message to be published.
pendingAddEntriesCountThe number of messages that have write requests (asynchronous) waiting on completion.
lastConfirmedEntryThe ledgerid:entryid of the last message that is written successfully. If the entryid is -1, then the ledger is opened or is currently opened but has no entries written yet.
stateThe state of the cursor ledger. The state LedgerOpened means that a ledger is open for saving published messages.
ledgersThe ordered list of all ledgers for this topic that holds its messages.
cursorsThe list of all cursors on this topic. Each subscription in the topic stats has a cursor.
markDeletePositionThe ack position: the last message that the subscriber acknowledges. All messages before this position are acknowledged by the subscriber.
readPositionThe latest position of the subscriber for reading messages.
waitingReadOpThis is true when the subscription reads the latest message that is published to the topic and waits for new messages to be published.
pendingReadOpsThe count of outstanding read requests to the BookKeepers in progress.
messagesConsumedCounterThe number of messages this cursor has acknowledged since this broker loads this topic.
cursorLedgerThe ledger used to persistently store the current markDeletePosition.
cursorLedgerLastEntryThe last entryid used to persistently store the current markDeletePosition.
individuallyDeletedMessagesThe range of messages acknowledged between markDeletePosition and the readPosition when acknowledges are done out of order.
lastLedgerSwitchTimestampThe last time when the cursor ledger is rolled over.
ledgersThe ordered list of all ledgers for this topic that holds messages.
schemaLedgersThe ordered list of all ledgers for this topic schema.
compactedLedgerThe ledgers holding un-acked messages after topic compaction.
ledgerIdThe ID of this ledger.
entriesThe total number of entries that belong to this ledger.
sizeThe size of messages written to this ledger (in bytes).
offloadedWhether this ledger is offloaded. The value is false for the compacted topic ledger.
metadataThe ledger metadata.