Q:

Getting latest message timestamp in my Kafka queue

I have Kafka 0.10.0, which, if I understand correctly, adds timestamps to all of the messages. For monitoring purposes, I want to pull out the timestamp of the newest message for a given topic. I did not see an API field for it in any of the Python libraries I have looked at.

A:

There is not straightforward method to get the latest message Timestamp from Kafka topics. But the work around is using kafka consumer, and use seek_to_end() to seek the most available offset for partitions. 
consumer.seek_to_end()
for message in consumer:
    print(message.timestamp)

You can refer the details here :
https://kafka-python.readthedocs.io/en/master/apidoc/kafka.consumer.html#kafka.consumer.KafkaConsumer.seek_to_end

