How to remove user kafka (created using the new user api)?

I created kafka consumers through the new consumer API
I am using kafka 2.10-0.9.0.1
We have 1 consumer group with 1 consumer instance in each group.

Kafka script "kafka-consumer-groups.sh" provides the ability to delete a user, but this only applies to older consumer groups. Running the command:

bin / kafka -consumer-groups.sh

Gives

- delete . WARNING. Group deletion only works for old ZK-based user groups, and you need to use them carefully to delete only those groups that are inactive.

So, I want to ask, is there a way to delete a user group created using the new user API?

+6
source share
1 answer

No need to delete with a new consumer. Here is what the script displays when trying to delete:

Please note that there is no need to delete group metadata for a new user, as he is automatically deleted when the last item leaves

This is a short answer. More: Metadata means two things. Firstly, simply information about consumers and consumer groups that are stored as part of the group membership coordinator. This is automatically deleted if all users in the group have left.

Secondly, the consumer group kept the perfect offsets in the Kafka theme (when a new consumer is used. Previously, they were used for storage in Zookeeper). This topic is not deleted immediately after the disappearance of a group of consumers. If the consumer group reappears again, it will automatically find the previous offsets in this section. He can use them or ignore them. If a consumer group never reappears, these stored offsets will eventually automatically be garbage collected.

So, in short, there is no need to delete anything when using a new user.

+5
source

All Articles