Skip to content

Instantly share code, notes, and snippets.

@ssaavedra
Created Jul 26, 2018
Embed
What would you like to do?
Get latest offset from a Kafka topic
get_latest_offset () {
kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list "$KAFKA_BROKER_LIST" --topic "$1" |cut -d: -f3 | sort | head -1
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment