Created
January 4, 2017 12:32
-
-
Save sonnysideup/99b6e81172611b0efb013f8f10d5e40d 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
# launch kafka broker in background | |
docker run -p 2181:2181 -p 9092:9092 -e ADVERTISED_HOST=localhost -e ADVERTISED_PORT=9092 -d spotify/kafka | |
# launch any kafka binary command against broker running in the background | |
# generic structure | |
docker run --net=host -ti spotify/kafka <YOUR_CMD> | |
# create a new topic | |
docker run --net=host -ti spotify/kafka \ | |
/opt/kafka_2.11-0.10.1.0/bin/kafka-topics.sh \ | |
--zookeeper localhost:2181 --create --topic new_svc_request --partitions 1 --replication-factor 1 | |
# describe all topics | |
docker run --net=host -ti spotify/kafka \ | |
/opt/kafka_2.11-0.10.1.0/bin/kafka-topics.sh \ | |
--zookeeper localhost:2181 --describe |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment