Skip to content

Instantly share code, notes, and snippets.

@akkomar
Last active November 24, 2016 19:20
Show Gist options
  • Save akkomar/cddd26f7b3f0260da89998b3c5229d23 to your computer and use it in GitHub Desktop.
Save akkomar/cddd26f7b3f0260da89998b3c5229d23 to your computer and use it in GitHub Desktop.
# List topics
bin/kafka-topics.sh --list --zookeeper zookeeper_host:2181
# Create topic
bin/kafka-topics.sh --create --zookeeper zookeeper_host:2181 --replication-factor 1 --partitions 1 --topic test
# Start consumer (v0.9)
bin/kafka-console-consumer.sh --zookeeper zookeeper_host:2181 --topic test --from-beginning
# List all broker ids
cd kafka_2.11-0.9.0.1
bin/zookeeper-shell.sh zookeeper_host:zookeeper:port
ls /brokers/ids
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment