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

All producing and consuming commands · Apache Kafka 4 cheatsheet

Was this page helpful?