Skip to content

pkgplus/kafka-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 

Repository files navigation

kafka-tool

Installation

Install from source

go get github.com/xuebing1110/kafka-tool

Install from binary

download

Usage

Usage of ./kafka-tool:
  -begin
        consume from begin
  -cmd string
        command, eg: consumer/copy/offset (default "consumer")
  -filter string
        the filter when copy string
  -group string
        the consumer group
  -host string
        brokerlist/topic
  -partition int
        partitionnum (default -1)
  -print
        printflag
  -remote string
        brokerlist/topic, on using command "copy"

Example

## consumer
kafka-tool -host 127.0.0.1:9092/mytopic

## consumer with filter
kafka-tool -host 127.0.0.1:9092/mytopic -filter aaaaaaaa

## consumer from begining
kafka-tool -host 127.0.0.1:9092/mytopic -begin

## copy topic to another topic
./kafka-tool -cmd copy -host 127.0.0.1:9092/mytopic1  -remote 127.0.0.1:9092/mytopic2

## dump the newest offset
./kafka-tool -cmd offset -host 127.0.0.1:9092/mytopic1

Releases

No releases published

Packages

No packages published