Download Kafka
, a open-source software platform developed by LinkedIn to handle real-time data.
-
Run
Command Line
as Administrator. -
Run command to
start up zookeeper server
.-
> cd ../../kafka > bin\windows\zookeeper-server-start.bat config\zookeeper.properties
-
-
Run command to
start up kafka server
.-
> cd ../../kafka > bin\windows\kafka-server-start.bat config\server.properties
-
-
Run command to
create a topic
to Store your Events.-
> cd ../../kafka > bin\windows\kafka-topics.bat --create --partitions 1 --replication-factor 1 --topic [YOUR KAFKA TOPIC] --bootstrap-server localhost:9092
-
-
Run command to
write some events
into the Topic.-
> cd ../../kafka > bin\windows\kafka-console-producer.bat --topic [YOUR KAFKA TOPIC] --bootstrap-server localhost:9092
-
-
Run command to
read the events
.-
> cd ../../kafka > bin\windows\kafka-console-consumer.bat --topic [YOUR KAFKA TOPIC] --from-beginning --bootstrap-server localhost:9092
-
-
Delete any data of your local Kafka environment including any events.
-
Close all kafka processes
on other terminal sessions.Ctrl-C
. -
> cd ../../kafka > tree /f > rmdir /s kafka-logs && rmdir /s zookeeper-data
-