Kafka Tools – kafka.tools.GetOffsetShell
GetOffsetShell can be used to get the last offsets of a topic or individual partitions of a topic. The tool is available with your Kafka installation. It can be run using kafka-run-class.
Here we are getting the offsets for Merged-SensorsHeartbeat topic.