Install Kafkacat On A Debian, Ubuntu, Kali, Raspbian And MacOS

Install Kafkacat On A Debian, Ubuntu, Kali, Raspbian And MacOS

kafkacat

Apache Kafka producer and consumer tool.

Maintainer: Vincent Bernat



Section: net

Install kafkacat

  • Debian apt-get install kafkacat Click to copy
  • Ubuntu apt-get install kafkacat Click to copy
  • Kali Linux apt-get install kafkacat Click to copy
  • Raspbian apt-get install kafkacat Click to copy
  • macOS brew install kafkacat Click to copy

Apache Kafka producer and consumer tool.

How to use kafkacat?

Below are few example commands for kafkacat that you can use in the terminal.

Consume messages starting with the newest offset:
kafkacat -C -t topic -b brokersClick to copy
Consume messages starting with the oldest offset and exit after the last message is received:
kafkacat -C -t topic -b brokers -o beginning -eClick to copy
Consume messages as a Kafka consumer group:
kafkacat -G group_id topic -b brokersClick to copy
Publish message by reading from stdin:
echo message | kafkacat -P -t topic -b brokersClick to copy
Publish messages by reading from a file:
kafkacat -P -t topic -b brokers path/to/fileClick to copy
List metadata for all topics and brokers:
kafkacat -L -b brokersClick to copy
List metadata for a specific topic:
kafkacat -L -t topic -b brokersClick to copy
Get offset for a topic/partition for a specific point in time:
kafkacat -Q -t topic}:partition:unix_timestamp -b brokersClick to copy
Installation of latest kafkacat command is available for Debian, Ubuntu, Kali, Raspbian and macOS. You can copy the command for your OS from above and paste it into your terminal. Once you run the command it will download the 2024 latest package from the repository and install it in your computer/server.