oleksiyk / kafka

Apache Kafka 0.9 client for Node
MIT License
297 stars 85 forks source link

Add an ability to check consumer lag #155

Closed juliusza closed 7 years ago

juliusza commented 7 years ago

I need to get consumer lag for monitoring purposes. Added a method that returns output similar to bin/kafka-run-class.sh kafka.admin.ConsumerGroupCommand --describe --group <groupId>

oleksiyk commented 7 years ago

Can you please rename client.getOffset to something like getPartitionOffset and also drop all changes to package.json file.

juliusza commented 7 years ago

Sure thing, bump.

juliusza commented 7 years ago

Did you have any random failures previously? I'm now getting this:

2017-03-06T08:24:58.993Z ERROR group-consumer1 Full rejoin attempt failed: NoKafkaConnectionError [[object Object]]: Connection closed { [NoKafkaConnectionError: Connection closed]

I don't think it's related to my changes. On both my local dev env and forked repo all 83 tests are passing. Please try to re-run travis build.

oleksiyk commented 7 years ago

Try restarting the build. I had some random network related errors with Travis too.

juliusza commented 7 years ago

Updated my comment. I can't re-run this build, as I'm not the owner. Maybe you need to increase the sleep 10. Not sure.