Created
April 12, 2018 05:56
-
-
Save seahrh/2882ae72390bd9b1641527323bdf0391 to your computer and use it in GitHub Desktop.
This file contains 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
# dump messages to stdout, uses old consumer api! | |
kafka-console-consumer --zookeeper localhost:2181 --topic my_topic --from-beginning | |
# | |
kafka-topics --zookeeper localhost:2181 --describe --topic my_topic | |
# alter topic | |
kafka-topics --zookeeper localhost:2181 --topic my_topic --alter --config retention.bytes=2087091200 | |
# delete topic | |
kafka-topics --zookeeper localhost:2181 --delete --topic my_topic | |
# create topic | |
kafka-topics --zookeeper localhost:2181 --create --topic my_topic --partitions 2 --replication-factor 3 | |
# | |
kafka-consumer-groups.sh –new-consumer –describe –group my_group –bootstrap-server localhost:9092 | |
# check offset, logsize, lag | |
kafka-run-class kafka.tools.ConsumerOffsetChecker --zookeeper localhost:2181 --group my_group | |
# Count messages by topic partition | |
kafka-run-class kafka.tools.GetOffsetShell --broker-list 1.2.3.4:2181,5.6.7.8:2181 --topic my_topic --time -1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment