kafkadog

command module
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2020 License: MIT Imports: 1 Imported by: 0

README

Release Release Go Report Card

kafkadog

A Kafka consumer/producer CLI. Barking version of Kafkacat.

Installation

Homebrew
$ brew install maximepeschard/tap/kafkadog
go get
$ go get github.com/maximepeschard/kafkadog
Binary

Grab the latest release for your platform.

Example usage

Consumer

Read messages and print their value on stdout :

$ kafkadog consume -b mybroker:9092 my_topic

Read messages and print them with the format topic.partition.offset -> value on stdout :

$ kafkadog consume -b mybroker:9092 -f '%t.%p.%o -> %v' my_topic

Read messages starting at the oldest available offset and print their value on stdout :

$ kafkadog consume -b mybroker:9092 -s oldest my_topic

Read messages starting from a date (in UTC timezone) and print their value on stdout :

$ kafkadog consume -b mybroker:9092 -s '2020-06-10 00:00:00' my_topic

Read messages starting from a UNIX timestamp (in milliseconds) and print their value on stdout :

$ kafkadog consume -b mybroker:9092 -s 1591747200000 my_topic
Producer

Produce one message :

$ echo '{"msg": "hello"}' | kafkadog produce -b mybroker:9092 my_topic

Produce messages read from stdin (default is one message per line, close with Ctrl-D / Ctrl-C) :

$ kafkadog produce -b mybroker:9092 my_topic

Produce messages read from a file (default is one message per line) :

$ kafkadog produce -b mybroker:9092 -f messages.txt my_topic

Detailed usage

Run kafkadog -h for detailed usage and help.

Credits

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL