Kafka server example for windows. Versão 2.12-2.3.0. You could start kafka easily in the Localhost.
You need to create the following folder: c:\Temp
You must run the following batch files, one by one in this order
- This batch file will start Zookeeper server.
- This batch file will start Kafka server. Zookeper must be started for kafka works.
- This file will create two topics (tdc-entrada and tdc-saida). Kafka and Zookeper must be started for this creation works.
Kafka commands for you run by command line
kafka-topics.bat --zookeeper localhost:2181 --topic tdc-entrada --create --partitions 3 --replication-factor 1 kafka-topics.bat --zookeeper localhost:2181 --topic tdc-saida --create --partitions 3 --replication-factor 1
kafka-topics.bat --zookeeper localhost:2181 --list
kafka-topics.bat --zookeeper localhost:2181 --delete --topic tdc-entrada
kafka-console-consumer.bat --bootstrap-server localhost:9092 --topic tdc-entrada -from-beginning
kafka-console-producer.bat --broker-list localhost:9092 --topic tdc-entrada
(write the message)