How to install kafka in windows 10 /Mac ?

How-install-kafka-windows-featured

This post can be followed to install / setup the kafka in both windows and mac machine.

How-install-kafka-windows-blog

Download kafka from this link


Are you seeing different version? No worries, just proceed with the recommended version as per the above image/link.

Extract Twice:


First: kafka_2.12-2.5.0.tgz to kafka_2.12-2.5.0.tar using 7zip / any other tool.

Second: kafka_2.12-2.5.0.tar to actual folder content

Is this looking similar to this ?


Let’s verify the installation


start zookeeper

Command to start the zookeeper

zookeeper-server-start.bat ..\..\config\zookeeper.properties

Verify zookeeper status

zookeeper is started with 2181 port by default

Like to change the zookeeper port ?

Then change the port in both zookeeper.properties and server.properties file to link the zooker and broker without any issues.

Start Kafka broker

Open another instance of cmd prompt then start kafka broker with this command.

make sure you have included the server.properites file
kafka-server-start.bat ..\..\config\server.properties

Verify kafka status

kafka started with 9092 port by default

Default kafka port: 9092

Default port 9092 and if you want to change to different ports then follow the steps.

How to change the default port in Kafka


server.properties file can be found inside the config folder of kafka

Add the below highlighted line with your desired port

add the highlighted line with your desired port

Now if you start the kafka broker again,

kafka broker is now started with 9093

You have successfully installed / setup the kafka successfully in windows. Same setup can be applicable for Mac system also. Only difference is the path of the command needs to be run.

Send and Receive messages in producer and consumer

Feel free to explore this link to create producer and consumer through command line then to post and receive the messages.

Leave a Reply