Apache Kafka 4 · Producing and consuming

Send keyed messages

Type key:value pairs. Messages with the same key go to the same partition.

bin/kafka-console-producer.sh --topic orders --bootstrap-server localhost:9092 --property parse.key=true --property key.separator=:

Official Apache Kafka 4 documentation

More producing and consuming commands

All producing and consuming commands · Apache Kafka 4 cheatsheet

Was this page helpful?