get_latest_offset () { kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list "$KAFKA_BROKER_LIST" --topic "$1" |cut -d: -f3 | sort | head -1 }