简体   繁体   中英

Kafka APIs for getting topic details like Partition and Offset

We have Node and Java applications uses Kafka clients.

Current requirement is to get the current offset for each partition for given topic.

We are able to see details in Confluent control center and need to get that information to display in our application.

您可以调用KafkaConsumer.endOffsets(Collection<TopicPartition> partitions)以获取给定主题的给定分区的结束偏移量。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM