Forrest logo
back to the kcat tool

kcat:tldr:91274

kcat: Consume messages starting with the newest offset.
$ kcat -C -t ${topic} -b ${brokers}
try on your machine

The command "kcat -C -t ${topic} -b ${brokers}" is a command-line instruction using the Kafka Cat (kcat) tool to consume messages from a Kafka topic.

Here's what each part of the command does:

  • "kcat": Refers to the Kafka Cat tool, a command-line utility used for interacting with Apache Kafka clusters.

  • "-C": Specifies the command to consume messages from Kafka.

  • "-t ${topic}": Specifies the topic from which the messages should be consumed. The "${topic}" is a placeholder that should be replaced with the actual name of the topic you want to consume messages from.

  • "-b ${brokers}": Specifies the list of bootstrap brokers used to establish the initial connection with the Kafka cluster. The "${brokers}" is a placeholder that should be substituted with the actual list of Kafka brokers' addresses. Typically, multiple broker addresses are separated by commas.

By running this command, you will consume messages from a specific Kafka topic using the provided bootstrap brokers.

This explanation was created by an AI. In most cases those are correct. But please always be careful and never run a command you are not sure if it is safe.
back to the kcat tool