DEV Community

sh3hz
sh3hz

Posted on

Apache Kafka: Quickstart: Binary Deployment in Windows

Introduction

Windows installation guide for https://kafka.apache.org/quickstart

Step 1: Downloading the Application

Image description

Step 2: Installation

  • Extract the Downloaded file (.tgz) with any file archiver like 7zip
  • After extracting you'll get a TAR File (.tar), Again extract the TAR file.

Image description

Step 3: Configuration

  • Update server.properties

    • Create new Directory - C:\tmp\kafka-logs
    • Update log.dirs=C:\tmp\kafka-logs
  • Update zookeeper.properties

    • Create new Directory - C:\tmp\zookeeper
    • Update _*dataDir*=C:\tmp\zookeeper_

Step 4: Running the Kafka Application

Kafka with ZooKeeper

  • Start Zookeeper Server

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

Image description

Image description

  • Start Kafka Server

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

Image description

Image description

Step 5: Create Topic

  • Topic name: quickstart-events

.\bin\windows\kafka-topics.bat --create --topic quickstart-events --bootstrap-server localhost:9092

Image description

Image description

Step 6: Producer: Write some events to topic

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

Image description

Step 7: Consumer: Read the events

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

Image description

Step 8: Stream messages

  • Add a message in Producer console from Step 6

Image description

  • Message is streamed to the Consumer console from Step 7

Image description

AWS Security LIVE!

Tune in for AWS Security LIVE!

Join AWS Security LIVE! for expert insights and actionable tips to protect your organization and keep security teams prepared.

Learn More

Top comments (0)

Image of AssemblyAI

Automatic Speech Recognition with AssemblyAI

Experience near-human accuracy, low-latency performance, and advanced Speech AI capabilities with AssemblyAI's Speech-to-Text API. Sign up today and get $50 in API credit. No credit card required.

Try the API

👋 Kindness is contagious

Immerse yourself in a wealth of knowledge with this piece, supported by the inclusive DEV Community—every developer, no matter where they are in their journey, is invited to contribute to our collective wisdom.

A simple “thank you” goes a long way—express your gratitude below in the comments!

Gathering insights enriches our journey on DEV and fortifies our community ties. Did you find this article valuable? Taking a moment to thank the author can have a significant impact.

Okay