Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

Missing kafka.consumer.* MBeans

avatar
Super Collaborator

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.

1 ACCEPTED SOLUTION

avatar

@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

View solution in original post

5 REPLIES 5

avatar

@james.jones are you using high-level consumer api? http://kafka.apache.org/documentation.html#highlevelconsumerapi

avatar
Super Collaborator

@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.

avatar
Super Collaborator

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).

avatar

@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

avatar
Super Collaborator

@schintalapani - Thanks! That's what I needed to know!