Kafka - kafka-console-producer

Kafka Commit Log Messaging Process

About

kafka-console-producer is a producer command line tool to read data from standard input and write it to a Kafka topic.

Example

  • From the command line:
kafka-console-producer --broker-list kafka02.example.com:9092,kafka03.example.com:9092 --topic t1

# or
readfile whatEver.json | kafka-console-producer --broker-list 127.0.0.1:9092 --topic topicname
  • With docker-compose and a kafka services
docker-compose exec kafka  bash -c "seq 42 | kafka-console-producer --request-required-acks 1 --broker-list localhost:29092 --topic foo && echo 'Produced 42 messages.'"





Discover More
Kafka Commit Log Messaging Process
Kafka - Console

The kafka application comes with utilities. This console application permits to read and write data from the console. : A consumer command line to read data from a Kafka topic and write it to...
Kafka Commit Log Messaging Process
Kafka - Producer (Write / Input)

A Kafka producer is an object that consists of: a pool of buffer space that holds records that haven't...



Share this page:
Follow us:
Task Runner