2 years ago
#57529
Mazen Ezzeddine
Timestamps for the committed offsets in Kafka through the admin API
In kafka, the committed offsets for a certain consumer group can be requested through the admin client API using a code similar to the below:
Map<TopicPartition, OffsetAndMetadata> offsets =
admin.listConsumerGroupOffsets(CONSUMER_GROUP)
.partitionsToOffsetAndMetadata().get();
Suppose that that log.message.timestamp.type
is set to LogAppendTime
When committing offsets by a consumer to the __consumer_offsets topic, any timestamp is written implicitly along with the committed offsets? Can this timestamp be retrieved using kafka Admin client API? Any other method to get such timestamp if any?
Thank you.
apache-kafka
kafka-consumer-api
kafka-producer-api
0 Answers
Your Answer