Skip to content

Kafkacat

kafkacat is a generic producer and consumer for Apache Kafka, and can be thought of as a netcat for Kafka.

Run kafkacat
❯ docker run --net=host --interactive --rm confluentinc/cp-kafkacat kafkacat <arguments>
❯ sudo apt-get install kafkacat

Cheatsheet

Argument Description
kafkacat -b service:39092 Specify broker
kafkacat -b service:39092 -X security.protocol=ssl Enforce SSL/TLS
kafkacat -b service:39092 -L List topics (-L)
kafkacat -b service:39092 -t some.topic -C Consume (-C) from a topic (-t)
kafkacat -b service:39092 -G consumergroup -t some.topic -C Set the consumer group (-G)
kafkacat -b service:39092 -t some.topic -P Produce (-P)