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
- Send messages from the terminal
- Read messages from the start
- Show keys and timestamps
- Consume as part of a group
All producing and consuming commands · Apache Kafka 4 cheatsheet