Installation steps of Kafka on ubuntu
(1) Download kafka version -
- Scala 2.8.0 - kafka_2.8.0-0.8.1.1.tgz (asc, md5)
From link - https://kafka.apache.org/downloads
(2) Open config file server.properties and change below perperties:
broker.id=0 to broker.id=1
(3) Run Zookeeper:Go to kafka folder and execute below command
bin/zookeeper-server-start.sh config/zookeeper.properties
(4) Run Kafka Server:- Go to kafka folder and execute below command
bin/kafka-server-start.sh config/server.properties
(5) Create Topic :-
bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test1
Topic created with name called test1
(6) Check topic list:
bin/kafka-topics.sh --list --zookeeper localhost:2181
(7) Start Producer console:
bin/kafka-console-producer.sh --broker-list localhost:9092 --topic test1
After that you can start writting your msg.
(8) Start Consumer console:-
bin/kafka-console-consumer.sh --topic test1 --zookeeper localhost:2181 --from-beginning
Then you can start getting producer msg.
Very good information
ReplyDelete