Skip to content

Instantly share code, notes, and snippets.

@lifeofreilly
Created October 27, 2015 19:39
Show Gist options
  • Save lifeofreilly/64bf63c654d82b199b04 to your computer and use it in GitHub Desktop.
Save lifeofreilly/64bf63c654d82b199b04 to your computer and use it in GitHub Desktop.

Start Zookeeper

bin/zookeeper-server-start.sh config/zookeeper.properties

Start Kafka

bin/kafka-server-start.sh config/server.properties

Create a topic

bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test

List topics

bin/kafka-topics.sh --list --zookeeper localhost:2181

Send some messages

bin/kafka-console-producer.sh --broker-list localhost:9092 --topic test This is a message

Start a consumer

bin/kafka-console-consumer.sh --zookeeper localhost:2181 --topic test --from-beginning

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment