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

Kafka Commands

The document provides instructions for setting up and starting Apache Kafka on a Windows system. It includes steps to start Zookeeper, launch the Kafka server, create topics, and set up producers and consumers. Specific commands for each action are outlined for user execution.

Uploaded by

badrooxe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views1 page

Kafka Commands

The document provides instructions for setting up and starting Apache Kafka on a Windows system. It includes steps to start Zookeeper, launch the Kafka server, create topics, and set up producers and consumers. Specific commands for each action are outlined for user execution.

Uploaded by

badrooxe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 1

cd c:\kafka

// démarrer Zookeeper

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

//start kafka server

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

//create topic

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

bin\windows\kafka-topics --create --topic quickstart-events2 --bootstrap-server localhost:9092 --


replication-factor 1 --partitions 1

//create producer

Start bin\windows\kafka-console-producer –topic quickstart-events --bootstrap-server localhost:9092

//create consumer

Start bin\windows\kafka-console-consumer –topic quickstart-events --bootstrap-server localhost:9092

//create consumer with properties

start bin\windows\kafka-console-consumer --topic output-topic --bootstrap-server localhost:9092 --


property value.deserializer=org.apache.kafka.common.serialization.LongDeserializer --property
print.key=true --property print.value=true

You might also like