Install Apache Kafka
Step-by-step installation guide for Windows, Linux, and macOS
33%
Step 3 of 6
Prerequisites
Install Java JDK before installing Kafka
Recommended for Kafka 3.6+
Recommended for Kafka 3.6+
Recommended for Kafka 3.6+
Verify Java Installation
Open Command Prompt and run:
java -versionDownload Apache Kafka
Download the latest Kafka release
Or visit kafka.apache.org/downloads
Important
Download the binary version (scala 2.13) for Windows. Extract to a folder without spaces (e.g., C:\kafka).
Start ZooKeeper
Start the ZooKeeper service (KRaft mode is optional)
Open a Command Prompt in the Kafka directory and run:
cd C:\kafka
bin\windows\zookeeper-server-start.bat config\zookeeper.propertiesZooKeeper will start on port 2181 by default. Keep this terminal open.
Start Kafka Broker
Start the Kafka server
Open a new Command Prompt and run:
cd C:\kafka
bin\windows\kafka-server-start.bat config\server.propertiesKafka will start on port 9092 by default. Keep this terminal open.
Verify Installation
Create a test topic and verify everything works
Create a test topic:
bin\windows\kafka-topics.bat --create --topic test-topic \
--bootstrap-server localhost:9092 --partitions 1 --replication-factor 1List topics to verify:
bin\windows\kafka-topics.bat --list --bootstrap-server localhost:9092Success!
If you see "test-topic" in the output, Kafka is installed correctly!
Next Steps
Create Topics
Learn about topic creation and configuration
Build Producer
Create your first Kafka producer in Java
Build Consumer
Create your first Kafka consumer in Java