📜  重置 kafka 偏移量 - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:55.993000             🧑  作者: Mango

代码示例1
# List the topics to which the group is subscribed
kafka-consumer-groups.sh --bootstrap-server  --group  --describe

# Reset the consumer offset for a topic (dry-run)
kafka-consumer-groups.sh --bootstrap-server  --group  --topic  --reset-offsets --to-earliest

# Reset the consumer offset for a topic (execute)
kafka-consumer-groups.sh --bootstrap-server  --group  --topic  --reset-offsets --to-earliest --execute