A Kafka consumer/producer CLI. Barking version of Kafkacat.
$ brew install maximepeschard/tap/kafkadog$ go get github.com/maximepeschard/kafkadogGrab the latest release for your platform.
Read messages and print their value on stdout :
$ kafkadog consume -b mybroker:9092 my_topicRead messages and print them with the format topic.partition.offset -> value on stdout :
$ kafkadog consume -b mybroker:9092 -f '%t.%p.%o -> %v' my_topicRead messages starting at the oldest available offset and print their value on stdout :
$ kafkadog consume -b mybroker:9092 -s oldest my_topicRead 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_topicRead messages starting from a UNIX timestamp (in milliseconds) and print their value on stdout :
$ kafkadog consume -b mybroker:9092 -s 1591747200000 my_topicRead messages starting at the oldest available offset and ending at a date (in UTC timezone) :
$ kafkadog consume -b mybroker:9092 -s oldest -e '2020-06-10 00:00:00' my_topicProduce one message :
$ echo '{"msg": "hello"}' | kafkadog produce -b mybroker:9092 my_topicProduce messages read from stdin (default is one message per line, close with Ctrl-D / Ctrl-C) :
$ kafkadog produce -b mybroker:9092 my_topicProduce messages read from a file (default is one message per line) :
$ kafkadog produce -b mybroker:9092 -f messages.txt my_topicRun kafkadog -h for detailed usage and help.