2 Star 3 Fork 0

wl4g / kafka_offset_tool

Create your Gitee Account
Explore and code with more than 6 million developers,Free private repositories !:)
Sign up
Clone or download
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README.md

KafkaOffsetTool is a lightweight tool for Kafka offset operation and maintenance

Build Status License

Quick start

Development environment installation

cd ${PROJECT_HOME}
go run pkg/kafka_offset_tool.go --action list-group --brokers localhost:9092

Production environment installation

Using of commands(Supporting two types of consumer operations: zookeeper and Kafka).

  • All command help. e.g
./kafkaOffsetTool --help
  • Sub-command help. e.g
./kafkaOffsetTool list-group --help
  • Get a list of all topics. e.g.
./kafkaOffsetTool list-topic --brokers=localhost:9092 --zkServers=localhost:2181
  • Get a list of all consumer group. e.g.
./kafkaOffsetTool list-group --brokers=localhost:9092 --zkServers=localhost:2181 --type=kf
  • Get a list of all group consumer owner offset describe. e.g.
./kafkaOffsetTool list-offset --brokers=localhost:9092 --zkServers=localhost:2181
  • Get a list of all group consumer owner offset describe export to file. e.g.
./kafkaOffsetTool list-offset --brokers=localhost:9092 --zkServers=localhost:2181 --exportFile=myTopic_offset.json
  • Reset the specified groupId, topic, and partition offset. e.g.
./kafkaOffsetTool reset-offset --brokers=localhost:9092 --zkServers=localhost:2181 --resetGroup=myConsumerGroup1 --resetTopic=mytopic1 --resetPartition=0 --resetOffset=100
  • Reset the specified groupId, topic, and partition offset from import file. e.g.
./kafkaOffsetTool reset-offset --brokers=localhost:9092 --zkServers=localhost:2181 --importFile=myTopic_offset.json

Welcome to raise bugs:

Contact author: <wanglsir@gmail.com,983708408@qq.com>

Comments ( 0 )

Sign in for post a comment

About

KafkaOffsetTool is a lightweight tool for Kafka offset operation and maintenance spread retract
Cancel

Releases

No release

Contributors

All

Activities

load more
can not load any more
Go
1
https://git.oschina.net/wl4g/kafka_offset_tool.git
git@git.oschina.net:wl4g/kafka_offset_tool.git
wl4g
kafka_offset_tool
kafka_offset_tool
master

Search