简体   繁体   English

如何删除卡夫卡“幽灵”消费者?

[英]How to delete Kafka "ghost" consumers?

When I use Kafka Tool: https://www.kafkatool.com/ I see additional consumer groups that I do not see with kafka-consumer-groups.sh当我使用 Kafka 工具时: https://www.kafkatool.com/我看到了我在kafka-consumer-groups.sh中看不到的其他消费者组

I'm assuming that the additional consumer groups are coming from Zookeeper while kafka-consumer-groups.sh only shows what it sees on the brokers.我假设额外的消费者组来自 Zookeeper,而kafka-consumer-groups.sh只显示它在代理上看到的内容。

Is there a way to delete these "ghost" groups?有没有办法删除这些“幽灵”组? They are not used?它们不被使用? Can I manually browse zookeeper and go delete those nodes?我可以手动浏览 zookeeper 和 go 删除这些节点吗?

IIRC, KafkaTool uses Zookeeper, not --bootstrap-server AdminClient protocol to list groups that kafka-consumer-groups does... IIRC,KafkaTool 使用 Zookeeper,而不是--bootstrap-server AdminClient 协议来列出kafka-consumer-groups所做的组......

Also, kafka-console-consumer creates random groups that get hidden in the kafka-consumer-groups output.此外, kafka-console-consumer创建隐藏在kafka-consumer-groups output 中的随机组。

While you could remove them from Zookeeper, all inactive consumer groups will automatically go away, as per the offsets retention policies over time, and having them there doesn't cause any performance penalties.虽然您可以将它们从 Zookeeper 中删除,但所有不活动的消费者组将自动 go 离开,根据偏移保留策略随着时间的推移,并且将它们放在那里不会导致任何性能损失。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM