Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

number of unconsumed messages in a partition #489

Closed
ssahukar opened this issue Jul 18, 2015 · 1 comment
Closed

number of unconsumed messages in a partition #489

ssahukar opened this issue Jul 18, 2015 · 1 comment

Comments

@ssahukar
Copy link

Hi,

Is there a way to get the information about the number of unconsumed messages in each partition? I think the metadata information obtained from Kafka does not have this info. What does the "ISR" element in metadata structure mean?

Thanks,
Shridhar

@eapache
Copy link
Contributor

eapache commented Jul 20, 2015

ISR (and all other protocol fields) are documented in the kafka protocol spec: https://cwiki.apache.org/confluence/display/KAFKA/A+Guide+To+The+Kafka+Protocol#AGuideToTheKafkaProtocol-MetadataResponse

To get the number of unconsumed messages depends on how your consumer is storing offsets... you have to fetch "most recently consumed offset" from that storage location (often zookeeper), and then you can ask kafka for the most recently produced offset (Client.GetOffset). The difference is how many unconsumed messages there are.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants