0

the newer versions of apache kafka store the consumer group data internally instead of using zookeeper

which means that the command-line utility kafka-consumer-groups is not useful since the related info is not stored in zookeeper now

could you please advise:

how to delete a consumer group C belonging to topic T when using the new consumer API

?

Hans Jespersen
  • 8,024
  • 1
  • 24
  • 31
nskalis
  • 2,232
  • 8
  • 30
  • 49
  • What do you want to achieve with this? If reset offsets - see https://stackoverflow.com/questions/42564594/how-do-i-delete-a-kafka-consumer-group-to-reset-offsets & https://cwiki.apache.org/confluence/display/KAFKA/KIP-122%3A+Add+Reset+Consumer+Group+Offsets+tooling – Alex Ott Nov 09 '17 at 19:32
  • @AlexOtt if i understood correctly i have to wait for the offset to expire. i just do not want that listed in my kafka manager admin page – nskalis Nov 09 '17 at 19:49
  • I think OP is asking how to get rid of a consumer group being registered with Kafka (i.e get rid of that consumers offset topic) – PragmaticProgrammer Nov 09 '17 at 22:39
  • @PragmaticProgrammer indeed – nskalis Nov 10 '17 at 08:02

2 Answers2

0

Note that deletion of a group is only available when the group metadata is stored in ZooKeeper. When using the new consumer API (where the broker handles coordination of partition handling and rebalance), the group is deleted when the last committed offset for that group expires.

./kafka-consumer-groups.sh --zookeeper --delete --group

Abhimanyu
  • 2,710
  • 2
  • 25
  • 42
0

If none of the members of the consumer group commit offsets for 24 hours (with default settings) it will expire and be deleted automatically.

Alternatively you can reset the offsets or set them to any value you want using the new --reset-offsets option to bin/kafka-consumer-groups

See Kafka 0.11 how to reset offsets

Hans Jespersen
  • 8,024
  • 1
  • 24
  • 31