Pipe a file of JSON records into a Kafka topic with one command to quickly load test data into a pipeline.
Read messages from a Kafka topic and pipe them into jq or grep to debug a production event stream without writing code.
Print a full map of all brokers, topics, and partition offsets in a Kafka cluster to inspect cluster health.
Test SSL and SASL authentication settings against a secured Kafka cluster from the terminal before wiring up an application.
kcat (previously named kafkacat) is a command-line tool for working with Apache Kafka, the distributed messaging system used to pass data between applications. The tool is written in C and does not require the Java runtime that most official Kafka tooling depends on, which makes it much smaller and faster to start up. The statically linked binary is under 150 kilobytes. Apache Kafka organizes data into named topics, and each topic is split into partitions. Messages flow from producers (things that write data) to consumers (things that read data). kcat lets you do both directly from the terminal, making it useful for debugging, testing pipelines, or piping data in and out of Kafka without writing any code. In producer mode, kcat reads lines from standard input and sends each one as a message to a topic you specify. You can also read from files, set compression, add headers, produce transactions, and enable exactly-once delivery guarantees. In consumer mode, kcat reads messages from a topic and prints them to standard output. You can subscribe to multiple topics at once, join a consumer group for balanced reading across instances, seek to specific offsets or timestamps, and control the output format. There is also a metadata mode that prints a summary of the entire Kafka cluster, including all brokers, topics, and partitions. The tool supports Avro message decoding through the Confluent Schema Registry, and it can deserialize keys or values using custom primitive format strings. Any Kafka configuration setting can be passed on the command line or stored in a config file, including SSL and SASL authentication settings for secure clusters. kcat is available via apt on Debian systems, Homebrew on macOS, dnf on Fedora, and as a Docker image. It can also be built from source using a bootstrap script that downloads and compiles its dependencies automatically.
← edenhill on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.