Our Community is getting an upgrade! To get everything ready for the relaunch, we’ll be placing the site in read-only mode starting September 21st.
We really appreciate your understanding while we get things set up behind the scenes. Catch up on all the exciting details about the move here.
Need help or have questions? Drop us a line at [email protected]
Created 05-18-2016 01:41 PM
What am I missing? I'm using JConsole connected to my Kafka 0.9.0 broker to find this:
kafka.consumer:type=ConsumerFetcherManager,name=MaxLag,clientId=([-.\w]+)
However, there is no kafka.consumer.* (nor kafka.producer.* for that matter).
Thanks.
Created 05-19-2016 12:10 AM
@james.jones the metric you are looking is for old high level consumer api. For the new consumer api can you use
kafka.consumer:type=consumer-fetch-manager-metrics,client-id=([-.w]+) and name=records-lag-max
Created 05-18-2016 11:37 PM
@james.jones are you using high-level consumer api? http://kafka.apache.org/documentation.html#highlevelconsumerapi
Created 05-18-2016 11:59 PM
@schintalapani I believe it is the new am using the interface provided by this (http://kafka.apache.org/documentation.html#newconsumerapi).
<dependency> <groupId>org.apache.kafka</groupId> <artifactId>kafka-clients</artifactId> <version>0.9.0.0</version> </dependency> org.apache.kafka.clients.consumer.KafkaConsumer<String,String>
However, I may be missing a fundamental point. I have mostly been looking at mbeans from the broker, not the client. I did run the client but still did not see kafka.consumer mbeans there either.
Created 05-19-2016 12:41 AM
I want to correct what I said above. On the client, kafka.consumer exists, but I was looking on the broker. And, the answer below is correct (newly named metric/Mbean is on the new consumer).
Created 05-19-2016 12:10 AM
@james.jones the metric you are looking is for old high level consumer api. For the new consumer api can you use
kafka.consumer:type=consumer-fetch-manager-metrics,client-id=([-.w]+) and name=records-lag-max
Created 05-19-2016 12:36 AM
@schintalapani - Thanks! That's what I needed to know!