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

Image of Timescale

Timescale – the developer's data platform for modern apps, built on PostgreSQL

Timescale Cloud is PostgreSQL optimized for speed, scale, and performance. Over 3 million IoT, AI, crypto, and dev tool apps are powered by Timescale. Try it free today! No credit card required.

Try free

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay