Can kcat/librdkafka tell me what the message batch sizes are, when I consume from a topic? #3716
Replies: 2 comments
-
Hi James, you will have to rely on the debug logs (which you correctly say are not subject to stability/compat guarantees, but in practice rarely change).
So the only thing missing is the compressed size. There are also histograms tracking the number of messages and total size per batch, see the per topic |
Beta Was this translation helpful? Give feedback.
-
Thanks Magnus! Just to make sure I used the right vocab, when I said I was looking for "batch size", what I meant was the producer's idea of a "batch", where it accumulates a set of messages before sending them all to the broker as a single request. (Is that a Is THAT the value that is displayed by I just did some experiments:
Which makes me think it's not actually measuring the batch/MessageSet size as stored in the topic, but rather that it's measuring something like the number of messages that the consumer retrieved. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
I am auditing some of my kafka topics to see whether producers are using compression and if so, what are the batch sizes they use.
To do this, I consume from the topic with debuglogs turned way up (
kcat -d all
). It returns the following output:At the end, I see that "lz4" tells me that the messages were compressed.
Are there any debuglogs that will tell me the message batch size? I know that kcat/librdkafka have to receive and open up the message batches, so I was hoping it might print out that information somewhere.
I realize that this is a non-standard usage of kcat, and that debuglogs are not intended to be a stable API/interface. I'm okay with the instability.
Thanks!
-James
Beta Was this translation helpful? Give feedback.
All reactions