Docker setup for Kafka
Once I wanted to play with Kafka, I couldn’t find a basic Docker setup to run the cluster and view topics, partitions and messages.
I suspect you have the same issue right now, so let me present you a docker-compose file which will run Kafka cluster with one instance of Zookeeper and three brokers. Also we’ll add a special application to view Kafka internals — Kafdrop.
Now you can you docker-compose tool to spin up the components and open http://localhost:9000/ and browse Kafka internals:
To connect the brokers outside the Docker you should use the following URLs: localhost:9092,localhost:9093,localhost:9094