Created
October 9, 2017 06:36
-
-
Save clarksun/540336aff2b246177a1bc7b4aee977a2 to your computer and use it in GitHub Desktop.
get kafka topic message count
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
kafka-run-class kafka.tools.GetOffsetShell --broker-list localhost:9092 --topic xxx --time -1 --offsets 1 | awk -F ':' '{sum += $3} END {print sum}' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
^CProcessed a total of 0 messages
ubuntu@prod-kafka-1:/opt/kafka/kafka_2.12-2.2.0$
Apparently, this is not correct and it gives wrong information as seen above.