我正在使用SpringKafka侦听器来读取来自kafka主题的消息。
@KafkaListener( id = "member-group", topics = "member-updated" )
我每次都会创建一个新的消费组(通过更改上面的组id)来消费所有记录。现在我有大约50个消费者群体,我想删除他们。我试图从kafka windows客户端中删除-
kafka-consumer-groups.bat --zookeeper <zookeeper-url> --delete --group <group-name>
但它失败了,输出如下-
Note: This will only show information about consumers that use ZooKeeper (not those using the Java consumer API).
Error: Delete for group '<group-name>' failed because group does not exist.
那么有没有办法通过代码或者其他工具来删除这些消费群体呢。什么是消费者组的默认保留策略。
1条答案
按热度按时间20jt8wwn1#
使用
--bootstrap-server host:port
而不是--zookeeper
.不带任何参数运行脚本以获取帮助。。。