Apache Kafka multi-zookeeper, multi-broker Setup in Windows using Docker

Prerequisite

Before proceeding, we need to have the following already running.

1. Git and GitHub access
2. Docker for windows
3. Kafka local setup [https://medium.com/@catchanilonline/apache-kafka-setup-in-windows-420f3cfd33b9]

Setup

  1. Check out the code from below git link to your local folder
    https://github.com/simplesteph/kafka-stack-docker-compose"

2. In command prompt enter the below command to start

D:\kafka\kafka-stack-docker-compose-master>

docker-compose -f zk-multiple-kafka-multiple.yml up

3. Testing the setup, using the below commands

kafka-topics — -zookeeper 127.0.0.1:2181 — -topic multi-reps — -create — -partitions 12 — -replication-factor 3

kafka-topics — -zookeeper 127.0.0.1:2181 — -topic multi-reps — -describe

Great, we are all set.

Happy Programming!

Reference links:-

Codebase link [https://github.com/simplesteph/kafka-stack-docker-compose]
Kafka local setup [https://medium.com/@catchanilonline/apache-kafka-setup-in-windows-420f3cfd33b9]
Kafka Tutorial link [https://www.linkedin.com/learning/learn-apache-kafka-for-beginners]