Install Apache kafka in Ubuntu 20 04

Published: 01 September 2023
on channel: Programming Tutorial
195
like

#apachekafka #install #installation #ubuntu
How to install apache kafka in ubuntu 20.04

Prerequisite
1. internet connection
2. OS Ubuntu 20.04

What will we do in this section
1. install apache kafka
2. run apache kafka
3. create topic
4. run publisher
5. run consumer
6. create message from publisher and consumer consume message which publisher writed before

Let's jump right in
1. download the latest apache kafka from this website (https://www.apache.org/dyn/closer.cgi...)
2. extract file and save to the installation directory
3. I put thi file in this path(/data/kafka)
4. open terminal in this path(/data/kafka/kafka_2.13-3.5.0)
5. start the kafka using Zookeeper
Start the Zookeper services
bin/zookeeper-server-start.sh config/zookeeper.properties
Start the kafka broker service(open the new tab)
bin/kafka-server-start.sh config/server.properties
6. Create topic to write, read, store and process the message/events
bin/kafka-topics.sh --create --topic my-topic --bootstrap-server localhost:9092
7. Run Publisher and send some message to the topic which created before
bin/kafka-console-producer.sh --topic my-topic --bootstrap-server localhost:9092
8. Run Consumer to read message or events which producer/publisher created before
bin/kafka-console-consumer.sh --topic my-topic --from-beginning --bootstrap-server localhost:9092


Try to write message in publisher/producer and check in consumer


Success, happy learning and happy sharing !!!
See you in the next tutorial :) :) :)


Watch video Install Apache kafka in Ubuntu 20 04 online without registration, duration hours minute second in high quality. This video was added by user Programming Tutorial 01 September 2023, don't forget to share it with your friends and acquaintances, it has been viewed on our site 195 once and liked it like people.