Hi I have downloaded Apache Kafka 0.10.0.0. RC4 from here, which has the ability now attach timestamps to messages as stated here.
I have then run it on my server as I normally would and it is receiving logs.
But when I am running the Kafka consumer console to view a topic, the logs look no different and have no timestamp? They are sent to Kafka in JSON would this affect things? Can you see them in the consumer console? IF not where?
I am trying to see how long it takes to get through the first stage of my pipeline.
By default the timestamp is not shown when running the console consumer. You must enable it via a property setting:
# `print.timestamp=true` requires Kafka 0.10.0+
$ kafka-console-consumer.sh --property print.timestamp=true [...]
Btw, you may also consider adding --property print.key=true
so that the console consumer also prints the key of a Kafka message.
Also, the application that writes to Kafka must support the new Kafka 0.10 message format, which includes the new embedded timestamps. Perhaps you can't see the timestamps because the upstream application/producer never included any.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With