7

I recently set up a test Kafka cluster. I am running a consumer group listening on items and things seem to work. The name of consumer group is default. What surprises me is that listing consumer groups gives me an empty list:

$ ./bin/kafka-consumer-groups.sh --zookeeper localhost:2181 --list
$

Also, explicitly querying the offsets doesn't yield anything:

$ ./bin/kafka-consumer-groups.sh --zookeeper localhost:2181 --describe --group default
No topic available for consumer group provided
GROUP, TOPIC, PARTITION, CURRENT OFFSET, LOG END OFFSET, LAG, OWNER

Do I need to manually create a consumer group using kafka-consumer-groups.sh —new-consumer to be able to track its offsets?

Ztyx
  • 14,100
  • 15
  • 78
  • 114

1 Answers1

16

Okay, I figured it out. I am using the new consumer/producer API. This means I need to use the —new-consumer flag. Example:

$ ./bin/kafka-consumer-groups.sh --new-consumer --bootstrap-server localhost:9092 --list
default
$
Ztyx
  • 14,100
  • 15
  • 78
  • 114
  • Which version of kafka you are using? I am using kafka_2.9.2-0.8.2.1, but I don't find any shell script or bat script in the bin directory with the name of kafka-consumer-groups. – Jaya Ananthram Dec 26 '15 at 06:41
  • neither one is working with 0.10.0.0, no idea how to list/delete consumer groups – d1xlord Jul 28 '16 at 07:44
  • I'm afraid I can't help you. I suggest you ask a new question or look in Kafka documentation. – Ztyx Jul 28 '16 at 18:42
  • 1
    Thank you for sharing that answer! I had the exact same problem. This option was in my face, but totally non-intuitive. – Brandon Apr 19 '17 at 00:03