0

This is the API call for getting topic offsets -

GET /topics/(string:topic_name)/partitions/(int:partition_id)/offsets

Here we have to give partition_id.

Is there a way to get offsets for all partitions of a topic in one API call?

OneCricketeer
  • 179,855
  • 19
  • 132
  • 245
  • Are you required to use a REST API? You can get the group offsets for a topic using a plain consumer instance. – OneCricketeer Aug 23 '22 at 18:50
  • Yes I m required to use REST API, though I won't have access to Kafka Admin APIs. That's a point but sadly, I won't be able to use consumer instance, consuming records is part of another application, that I won't be touching. – Aishwarya Sharma Aug 24 '22 at 03:41
  • In that case, I don't think you can get all partition offsets at once – OneCricketeer Aug 24 '22 at 13:38

0 Answers0