Created
July 26, 2018 18:07
-
-
Save ssaavedra/8345146a99c5bc68020d7eac0f0480fe to your computer and use it in GitHub Desktop.
Get latest offset from a Kafka topic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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