How to create kafka topic via CLI
#learnkafka #kafkainwindow #howtosetup #apachekafka #stepbystep #java create topics using Command Line Interface(CLI) on Windows 1: Initially, make sure that both zookeeper, as well as the Kafka server, should be started. zookeeper-server-start.bat C:\software\kafka_2.12-2.8.0\config\zookeeper.properties kafka-server-start.bat C:\software\kafka_2.12-2.8.0\config\server.properties 2: Type 'kafka-topics -zookeeper localhost:2181 -topic -create' on the console and press enter. Here, the name of the topic is 'myfirst' kafka-topics -zookeeper localhost:2181 -topic provide_topic_name -create "missing required argument partitions" it is necessary to declare the number of partitions and its ISR(replication factor), while creating a topic. If not declared, such type of errors will be thrown. kafka-topics.bat -zookeeper localhost:2181 -topic provide_topic_name --create --partitions 3 --replication-factor 1 see all created topic kafka-topics.bat -zookeeper localhost:2181 -list describe the topic kafka-topics.bat -zookeeper localhost:2181 -describe --topic provide_topic_name kafka-topics.bat -zookeeper localhost:2181 -topic provide_topic_name --delete
Download
0 formatsNo download links available.