How to Run Kafka on Windows: Install and Configure Kafka & Zookeeper

Опубликовано: 14 Сентябрь 2026
на канале: The Data Engineering Hub
740
5

In this video, we'll walk you through the simple process of setting up *Apache Kafka* on *Windows* and getting started with sending and consuming messages. Whether you're a beginner or just looking to get Kafka running locally, this tutorial will cover everything you need to know.

*Steps Covered in This Video:*
1. *Download and Install Kafka* on Windows.
2. **Set Up Zookeeper**: Start Zookeeper, which is required for Kafka to run.
3. **Start the Kafka Broker**: Get Kafka running on your local machine.
4. **Create a Kafka Topic**: Learn how to create a topic to store and manage your messages.
5. **Send Messages to Kafka**: Use the Kafka producer to send messages to the topic.
6. **Consume Messages**: Finally, we'll use the Kafka consumer to retrieve and view the messages.

*Prerequisites:*
**Java**: Apache Kafka requires Java to be installed on your machine. You can download the latest version of Java JDK here: [Java JDK Download](https://www.oracle.com/in/java/techno....

**Kafka**: Download the latest Kafka release from the official website here: [Kafka Downloads](https://kafka.apache.org/downloads).


1: Start Zookeeper 🦓

Open Command Prompt or PowerShell as Administrator, navigate to the Kafka directory, and start Zookeeper:

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

2: Start Kafka Broker 🏗️

Open another terminal window, and run this command to start the broker:

.\bin\windows\kafka-server-start.bat .\config\server.properties

3: Create a Topic 📂

Once Kafka is up, create a topic to store messages:

.\bin\windows\kafka-topics.bat --create --topic test --bootstrap-server localhost:9092 --partitions 1 --replication-factor 1

4: Produce a Message 📧

Start sending messages to the topic. Run this command to launch the producer:

.\bin\windows\kafka-console-producer.bat --topic test --bootstrap-server localhost:9092

Type in your messages, and hit Enter.
5: Consume Messages 📬

Finally, open another terminal to consume and see the messages you sent:

.\bin\windows\kafka-console-consumer.bat --topic test --from-beginning --bootstrap-server localhost:9092

Kafka, Windows, Setup Kafka, Kafka on Windows, Zookeeper, Install Kafka, Apache Kafka Tutorial, Kafka Consumer, Kafka Producer, Create Kafka Topic, Kafka Beginner Guide, Java Setup for Kafka