<@U078Y59KC3B> if messages are being published wit...
# ask-ai
s
@RunLLM if messages are being published with batching enabled, is there any metric that will indicate the total number of messages that are yet to be consumed by a subscription?
r
Sure thing! I'm looking through the available data to answer your question. Hold on a second... ⏳
s
@RunLLM if messages are being published with batching enabled, is there any metric that will indicate the total number of messages that are yet to be consumed by a subscription?
r
When batching is enabled, the backlog metrics (such as
msgBacklog
and
pulsar_subscription_back_log
) represent the number of batches, not the total number of individual messages. Pulsar tracks batches as single units in the backlog, so there is no direct metric that shows the total number of unconsumed individual messages for a subscription when batching is enabled. You would need to estimate the total by multiplying the backlog (batches) by the average batch size, but this is not provided as a built-in metric by Pulsar or StreamNative platforms according to the documentation and code references provided (Pulsar batching docs, subscription metrics). Would you like more detail on how to estimate the total unconsumed messages or on how batch index acknowledgment affects this calculation? Sources: - Pulsar batching docs - Subscription metrics 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.