kafka-consumer-groups 命令问题
kafka-consumer-groups command issue
我运行这个命令:
kafka-consumer-groups --bootstrap-server localhost:9092 --group my-consumer-group --reset-offsets --to-earliest --execute --topic my-topic-1
给出错误:
The syntax of the command is incorrect.
根据此命令的帮助结果,我输入的内容似乎是正确的。
我在这里犯了什么错误?
编辑:根据 documentation 示例,在为消费者组重置偏移量时,似乎不需要 --execute
。
EDIT2:我已经查看了 source code, apparently --execute
is needed else it would be treated as a dry run thus offset will not be reset. If your binary is built before this fix,然后你会得到提到的无效命令错误。
删除它,您的命令将起作用:
kafka-consumer-groups --bootstrap-server localhost:9092 --group my-consumer-group --reset-offsets --to-earliest --topic my-topic-1
我运行这个命令:
kafka-consumer-groups --bootstrap-server localhost:9092 --group my-consumer-group --reset-offsets --to-earliest --execute --topic my-topic-1
给出错误:
The syntax of the command is incorrect.
根据此命令的帮助结果,我输入的内容似乎是正确的。
我在这里犯了什么错误?
编辑:根据 documentation 示例,在为消费者组重置偏移量时,似乎不需要 --execute
。
EDIT2:我已经查看了 source code, apparently --execute
is needed else it would be treated as a dry run thus offset will not be reset. If your binary is built before this fix,然后你会得到提到的无效命令错误。
删除它,您的命令将起作用:
kafka-consumer-groups --bootstrap-server localhost:9092 --group my-consumer-group --reset-offsets --to-earliest --topic my-topic-1