kcat
generic non-JVM producer and consumer for Apache Kafka
TLDR
Consume messages from topic
$ kcat -b [localhost:9092] -t [topic] -C
Produce message to topic$ echo "[message]" | kcat -b [localhost:9092] -t [topic] -P
List metadata$ kcat -b [localhost:9092] -L
Consume with custom format$ kcat -b [localhost:9092] -t [topic] -C -f '%k: %s\n'
Consume from beginning$ kcat -b [localhost:9092] -t [topic] -C -o beginning
Query watermarks$ kcat -b [localhost:9092] -t [topic] -Q
SYNOPSIS
kcat [options] mode
DESCRIPTION
kcat (formerly kafkacat) is a generic non-JVM producer and consumer for Apache Kafka. Written in C using librdkafka, it provides a lightweight CLI for interacting with Kafka clusters. Supports producing, consuming, and listing metadata.
PARAMETERS
-b brokers
Kafka broker list.-t topic
Topic to produce/consume.-C
Consumer mode.-P
Producer mode.-L
Metadata list mode.-Q
Query mode for offsets.-f format
Output format string.-o offset
Starting offset.-G group
Consumer group.
HISTORY
Originally named kafkacat, the tool was renamed to kcat. Both names may still be in use depending on the installation.
