查看kafka消费组对应的信息:
./kafka-consumer-groups.sh --bootstrap-server 172.17.6.10:9092 --describe --group friend-group 查看最小的offset:
./kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list 192.168.71.133:9092,192.168.71.134:9092,192.168.71.135:9092 -topic monitor_warn --time -2
查看最大的offset:
./kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list 192.168.71.133:9092,192.168.71.134:9092,192.168.71.135:9092 -topic monitor_warn --time -1
重置某组的offset到最早的值
kafka-consumer-groups.sh --bootstrap-server 127.0.0.1:9092 --group group1 --topic topic1 --reset-offsets --to-earliest --execute