<@U078Y59KC3B> Last ack timestamp is 0 for readers...
# ask-ai
s
@RunLLM Last ack timestamp is 0 for readers ?
r
Yes, for Pulsar readers, the "last acked timestamp" is always 0. This is because readers use non-durable, exclusive subscriptions and do not send acknowledgments to the broker—unlike consumers, which track and update acknowledgment timestamps. As a result, the
lastAckedTimestamp
field for a reader remains at its default value of 0 in stats and metrics outputs. This behavior is confirmed in the Pulsar codebase and documentation, where only consumers update and report acknowledgment timestamps, not readers (Consumer stats,

Reader vs Consumer▾

). Would you like more detail on how this is implemented or how to interpret stats for readers? Sources: - Consumer stats - Figure Image 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.
s
@RunLLM last_consumed timestamp is zero
r
For Pulsar readers, the
lastConsumedTimestamp
is always 0 because readers do not update this field—only consumers do. The
lastConsumedTimestamp
tracks when a consumer last read a message, but for readers (which use non-durable, exclusive subscriptions and do not acknowledge messages), this timestamp remains unset (Consumer stats,

Reader vs Consumer▾

). Would you like more detail on the difference between reader and consumer stats? Sources: - Consumer stats - Figure Image 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.
s
@RunLLM how to get the subscription stats
r
You can get subscription stats in Pulsar using the
pulsar-admin topics stats
command, the REST API, or the Java admin client. For example, with the CLI:
Copy code
pulsar-admin topics stats persistent://tenant/namespace/topic
This returns detailed stats for all subscriptions on the topic, including message rates, backlog, and timestamps (Admin API Topics - Stats, Administration Stats - Subscription Stats). Would you like more detail or examples for REST API or Java client usage? Sources: - Admin API Topics - Stats - Administration Stats - Subscription Stats 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.
s
@RunLLM any way if we can check y the messages are not getting consumed
r
To check why messages are not getting consumed in Pulsar, review the subscription stats using
pulsar-admin topics stats <topic>
. Look for high backlog, zero
msgRateOut
, or low
messageAckRate
, which indicate consumers are not processing or acknowledging messages. Also, check consumer connection status and logs for errors (Administration Stats - Subscription Stats, Consumer stats). Would you like more detail on interpreting these stats or troubleshooting consumer issues? Sources: - https://pulsar.apache.org/docs/3.2.x/getting-started-docker#consume-a-message - https://github.com/apache/pulsar/issues/22709 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.
s
@RunLLM how can i check if ledger exsist in bookie using pulsar admin
r
You cannot directly check if a ledger exists in a bookie using Pulsar Admin. This functionality is not provided by the Pulsar Admin CLI or REST API. To check ledger existence, you must use BookKeeper tools or the PCK tool (PCK Overview). Would you like more detail on using BookKeeper or PCK to check ledger existence? Sources: - PCK Overview 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.
s
@RunLLM bookeeper tool