Skip to content

Instantly share code, notes, and snippets.

@edgar
Last active February 5, 2021 10:19
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save edgar/7be8459b8e281464ae06faec15227f28 to your computer and use it in GitHub Desktop.
Save edgar/7be8459b8e281464ae06faec15227f28 to your computer and use it in GitHub Desktop.
Run spotify/kafka docker
docker run -p 2181:2181 -p 9092:9092 --env ADVERTISED_HOST=localhost --env ADVERTISED_PORT=9092 spotify/kafka
docker run -it --rm spotify/kafka /bin/bash
$KAFKA_HOME/bin/kafka-console-producer.sh --broker-list 172.17.0.2:9092 --topic test
docker run -it --rm spotify/kafka /bin/bash
$KAFKA_HOME/bin/kafka-console-consumer.sh --zookeeper 172.17.0.2:2181 --topic test
@ernestoguimaraes
Copy link

Nice tips! Thank you edgar!

@mabdiel
Copy link

mabdiel commented May 1, 2020

Thanks!

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