### Purging a topic `bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic MyTopic --config retention.ms=1000` ... wait a minute ... `bin/kafka-topics.sh --zookeeper localhost:2181 --alter --topic MyTopic --delete-config retention.ms` ### Get the earliest offset of a topic `bin/kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list kafkasrv:9092 --topic mytopic --time -2` ### Get the latest offset of a topic `bin/kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list kafkasrv:9092 --topic mytopic --time -1`