0% found this document useful (0 votes)
14 views1 page

Kafka Run Commands

The document provides a step-by-step guide for setting up and managing a Kafka environment using command prompt. It includes commands for starting Zookeeper and Kafka servers, creating and deleting topics, producing messages, and consuming messages. Additionally, it outlines how to list topics in the Kafka setup.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views1 page

Kafka Run Commands

The document provides a step-by-step guide for setting up and managing a Kafka environment using command prompt. It includes commands for starting Zookeeper and Kafka servers, creating and deleting topics, producing messages, and consuming messages. Additionally, it outlines how to list topics in the Kafka setup.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

in command prompt - CD C:\CDE\Kafka\kafka_2.12-2.7.

zookeeper:-

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

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

Create topic:-
.\bin\windows\kafka-topics.bat --create --zookeeper localhost:2181 --replication-
factor 1 --partitions 1 --topic vaarahiB38
.\bin\windows\kafka-topics.bat --bootstrap-server localhost:9092 --create --topic
test-topic --partitions 1 --replication-factor 1

Producer:-
.\bin\windows\kafka-console-producer.bat --broker-list localhost:9092 --topic
vaarahiB38

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

--------------------------------------

Delete Topic:
.\bin\windows\kafka-topics.bat --zookeeper localhost:2181 --delete --topic
kafkatopic

Listing Topics:
.\bin\windows\kafka-topics.bat --list --zookeeper localhost:2181
.\bin\windows\kafka-topics.bat --list --bootstrap-server localhost:9092

You might also like