How to Produce and Consume Messages from Kafka Topics Using Commands on Windows - Step-by-Step Guide

Опубликовано: 18 Март 2026
на канале: Java Classified with Devops
311
0

In this video I have show to you to process the setting up and using Apache Kafka on a Windows system. This video will demonstrate how to produce and consume messages from Kafka topics using command-line tools.

What you'll learn:

Setting up Apache Kafka on Windows
Starting Kafka and Zookeeper services
Creating and managing Kafka topics
Producing messages to Kafka topics using the kafka-console-producer command
Consuming messages from Kafka topics using the kafka-console-consumer command
Produce consume messages Kafka topics Windows commands tutorial
Kafka produce consume messages Windows step-by-step guide
How to produce consume messages Kafka topics Windows
Kafka messages produce consume Windows command tutorial
Kafka produce consume messages using Windows commands guide
Kafka topic message production and consumption commands Windows
Kafka command-line produce consume messages on Windows tutorial
Step-by-step Kafka message production consumption Windows
How to use Kafka commands to produce consume messages on Windows
Kafka Windows tutorial produce consume messages with commands


#KafkaTutorial,#KafkaTopics,#CommandPrompt,#NoDocker,#KafkaBeginners,#CMDCommands,#NoDockerNeeded,#TopicManagement,#LearnCMD,#SoftwareDevelopment,#Kafka



1. Install JDK: Ensure the Java Development Kit (JDK) is installed and set the JAVA_HOME environment variable.
2. Download Kafka: Obtain the latest Kafka version from the Apache Kafka downloads page and extract it to a directory, such as C:\kafka.
3. Start Zookeeper: Open a Command Prompt, navigate to the Kafka directory, and start Zookeeper with the command:
.\bin\windows\zookeeper-server-start.bat .\config\zookeeper.properties
4. Start Kafka Server: In another Command Prompt, navigate to the Kafka directory and start the Kafka server:
.\bin\windows\kafka-server-start.bat .\config\server.properties

5. Open another CMD and Create the topic by using below command:
.\bin\windows\kafka-topics.bat --create --topic topic-name --bootstrap-server localhost:9092 --partitions 2 --replication-factor 1

6. Check all the available topic name list by using below command:
.\bin\windows\kafka-topics.bat --list --bootstrap-server localhost:9092

7. Check all the information of the particular topic by using below command :
.\bin\windows\kafka-topics.bat --describe --topic topic-name --bootstrap-server localhost:9092

8. Produce the message using kafka-console-producer command using cmd.
.\bin\windows\kafka-console-producer.bat --topic testtopic --bootstrap-server localhost:9092

9. Consume the messgae using kafka-console-consumer command using cmd.
.\bin\windows\kafka-console-consumer.bat --topic testtopic --from-beginning --bootstrap-server localhost:9092

#ApacheKafka,#WindowsTutorial,#MessagingSystem,#ProducerConsumer,#BigData,#LearnKafka,#KafkaCommands,#MessageQueue,#DataStreaming,#KafkaOnWindows,#DevOps,#TechExplained,#KafkaProducer,#KafkaConsumer,#DataPipeline #Kafka, #KafkaUI, #KafbatUI, #KafkaMonitoring, #ApacheKafka, #KafkaTools, #KafkaDashboard, #KafkaAdmin, #KafkaLocalSetup, #KafkaBeginners, #KafkaTopics, #KafkaConsumer, #KafkaProducer, #KafkaWithDocker, #KafkaOnWindows, #KafkaDevOps, #KafkaAdminTools, #KafkaCluster, #KafkaExplained, #KafkaTutorial, #KafkaVisualization, #KafkaForBeginners, #Kafka2025, #KafkaSetup, #DockerKafka, #KafkaLogMonitoring, #KafbatDashboard, #KafbatKafka, #KafkaWebUI, #KafkaOpenSource, #KafkaCommunity, #KafkaLearning, #KafkaNode, #KafkaUI2025, #KafkaStream, #KafkaBroker, #KafkaShorts, #KafkaDev