Installing Kafka On Windows

Share

Installing Kafka On Windows

Title: Installing Apache Kafka on Windows: A Step-by-Step Guide

Introduction

Apache Kafka is a powerful, distributed streaming platform that has become the backbone of many real-time data processing applications. If you’re working with large-scale data on a Windows system, understanding how to install and use Kafka is critical. While Kafka was primarily designed for Linux environments, there are ways to set it up on Windows seamlessly. Let’s dive into the details!

Prerequisites

  1. Windows 10 or Above: Kafka works best on modern Windows versions

Steps

1. Download Apache Kafka

  • Visit the official Apache Kafka download page .
  • Click the “Binary downloads” link.
  • Choose the appropriate Scala version and download the .

2. Extract the Archive

  • Right-click on the downloaded .tgz file and select “Extract All.”
  • Choose a suitable location on your drive (e.g., C:\kafka).

3. Set Environment Variables (Optional)

  • This step is optional but makes using Kafka more convenient.
  • Search for “environment variables” in the Windows search bar.
  • Please create a new System variable named KAFKA_HOME and set its value to your Kafka installation directory (e.g., C:\kafka_2.13-3.0.0).
  • Edit the Path system variable and add %KAFKA_HOME%\bin\windows to it.

4. Configuring Zookeeper

  • Kafka relies on Zookeeper for coordination.
  • Navigate to the config folder inside your Kafka installation directory.
  • Open zookeeper.properties with a text editor.
  • Find the line dataDir=… and specify a location for Zookeeper’s data directory (e.g., dataDir=C:\kafka\zookeeper-data).
  • Create this folder if it doesn’t exist.

5. Configuring Kafka Server

  • Open the file server.properties in the config folder.
  • Find the log.dirs= property and set it to a desired location for Kafka logs.
  • Create the folder if it doesn’t exist.

6. Starting the Services

  • If using WSL: Follow standard Linux instructions to start Zookeeper and Kafka servers.
  • Without WSL:
    • Open a command prompt and navigate to the \bin\windows folder within your Kafka installation.
    • Start Zookeeper: zookeeper-server-start.bat ../config/zookeeper.properties
    • Open a new command prompt and start Kafka: Kafka-server-start.bat ../config/server.properties

7. Verification

  • Create a test topic: kafka-topics.bat –create –bootstrap-server localhost:9092 –replication-factor 1 –partitions 1 –topic test-topic
  • List the topic: kafka-topics.bat –list –bootstrap-server localhost:9092

Conclusion

Congratulations! You’ve successfully installed Apache Kafka on Windows. You’re ready to begin building robust, real-time data streaming applications. For deeper understanding and more complex setups, 

 

You can find more information about  Apache Kafka  in this Apache Kafka

 

Conclusion:

Unogeeks is the No.1 IT Training Institute for Apache kafka Training. Anyone Disagree? Please drop in a comment

You can check out our other latest blogs on  Apache Kafka  here –  Apache kafka Blogs

You can check out our Best In Class Apache Kafka Details here –  Apache kafka Training

Follow & Connect with us:

———————————-

For Training inquiries:

Call/Whatsapp: +91 73960 33555

Mail us at: info@unogeeks.com

Our Website ➜ https://unogeeks.com

Follow us:

Instagram: https://www.instagram.com/unogeeks

Facebook: https://www.facebook.com/UnogeeksSoftwareTrainingInstitute

Twitter: https://twitter.com/unogeek


Share

Leave a Reply

Your email address will not be published. Required fields are marked *