kafka
- https://kafka.apache.org
- distributed streaming platform
download
quickstart
-
step
- Download
- Start the server
- zookeeper
bin/zookeeper-server-start.sh config/zookeeper.propertiesbin\windows\zookeeper-server-start.bat config/zookeeper.properties
- kafka
bin/kafka-server-start.sh config/server.propertiesbin\windows\kafka-server-start.bat config/server.properties
- start topic
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic testbin\windows\kafka-topics.bat --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test
- Send some messages
bin/kafka-console-producer.sh --broker-list localhost:9092 --topic testbin\windows\kafka-console-producer.bat --broker-list localhost:9092 --topic test
textThis is a message
This is another message
- Start a consumer
-
bin/kafka-console-consumer.sh --bootstrap-server localhost:9092 --topic test --from-beginning-bin\windows\kafka-console-consumer.bat --bootstrap-server localhost:9092 --topic test --from-beginning