Skip to content

Instantly share code, notes, and snippets.

@thanhpk
Created December 18, 2018 04:11
Show Gist options
  • Save thanhpk/05b782d3062ae71faba0606fd7847078 to your computer and use it in GitHub Desktop.
Save thanhpk/05b782d3062ae71faba0606fd7847078 to your computer and use it in GitHub Desktop.
zookeeper
# list all topic
bin/kafka-topics.sh --list --zookeeper zookeeper:2181
# count topic message
bin/kafka-run-class.sh kafka.tools.GetOffsetShell --broker-list localhost:9092 --topic AccountSynced2 --time -1
# alter topic config
bin/kafka-topics.sh --zookeeper zookeeper:2181 --alter --topic AccountSynced2 --config cleanup.policy=compact
bin/kafka-topics.sh --zookeeper zookeeper:2181 --alter --topic AccountSynced2 --config cleaner.min.compaction.lag.ms=10
bin/kafka-topics.sh --zookeeper zookeeper:2181 --alter --topic AccountSynced2 --config cleaner.min.compaction.lag.ms=10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment