Apache Kafka 4 · Producing and consuming
Show keys and timestamps
Print each message's key and timestamp too.
bin/kafka-console-consumer.sh --topic orders --bootstrap-server localhost:9092 --property print.key=true --property print.timestamp=true
Official Apache Kafka 4 documentation
More producing and consuming commands
- Send messages from the terminal
- Send keyed messages
- Read messages from the start
- Consume as part of a group
All producing and consuming commands · Apache Kafka 4 cheatsheet