Archives of Support Questions (Read Only)

This is an archived board for historical reference. Information and links may no longer be available or relevant
Announcements
This board is archived and read-only for historical reference. To ask a new question, please post a new topic on the appropriate active board.

Missing kafka.consumer.* MBeans

avatar
Master 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
Master 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
Master 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
Master Collaborator

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