How to install Kafka on Windows 11

In this tutorial, we will guide you through the steps to download and install Kafka on Windows 11 operating system.

Prerequisites

Before installing Kafka on Windows 11, ensure that the following prerequisites are met:

  1. Java Development Kit (JDK) must be installed on your system. You can download it from Oracle's official website.

  2. Set the JAVA_HOME environment variable pointing to your JDK installation directory.

  3. Check that the JAVA_HOME environment variable is added to the system path:

    echo %JAVA_HOME%
    

    This should print the directory path where the JDK is installed.

Steps

  1. Download the latest Kafka binary version from https://kafka.apache.org/downloads.

  2. Extract the compressed Kafka file into a directory of your choice (such as C:\Kafka).

    To do this, right-click on the downloaded file and select "Extract All".

  3. Edit the config\server.properties file by changing the listeners property under Networking Settings. By default, it is set to listeners=PLAINTEXT://:9092. Change it to listeners=PLAINTEXT://localhost:9092 to avoid any issues.

  4. Open a command prompt in administrator mode and navigate to the Kafka directory.

    cd C:\Kafka
    
  5. Start the ZooKeeper server by running the following command:

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

    You should see a message INFO ...binding to port 0.0.0.0/0.0.0.0:2181 indicating that the ZooKeeper server has started.

  6. Open a new command prompt in administrator mode and navigate to the Kafka directory.

    cd C:\Kafka
    
  7. Start the Kafka server by running the following command:

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

    You should see a message INFO ...started (kafka.server.KafkaServer) [kafkaServerId=0] indicating that the Kafka server has started.

    Kafka is now installed and running on your Windows 11 system. Congratulations!

Conclusion

In this tutorial, we showed you how to install Kafka on your Windows 11 operating system, starting from the prerequisites and going through the step-by-step installation process. Now you can use Kafka's powerful message queuing system for a variety of use cases, from distributed systems to big data processing.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!