18 Mar 2017, 17:00

Low/High Watermark Offsets

The lowest and highest available offsets for a specific Kafka topic / partition can be determined from the command line as follows:

Highest Available Kafka Topic/Partition Offset:

From the Confluent Platform directory:

./bin/kafka-run-class kafka.tools.GetOffsetShell --broker-list <host>:<port> --topic <topic-name> --partition <partition-number> --time -1

Lowest Available Kafka Topic/Partition Offset:

./bin/kafka-run-class kafka.tools.GetOffsetShell --broker-list <host>:<port> --topic <topic-name> --partition <partition-number> --time -2

Omit the --partition parameter to retrieve offsets for all partitions of the topic.