Download Kafka binary file from https://kafka.apache.org/downloads and install it
Set up Kafka listen on PLAINTEXT://localhost:9092
1 | terrence@igloo /usr/local/kafka |
- Start Zookeeper
1 | igloo:kafka root# bin/zookeeper-server-start.sh config/zookeeper.properties |
- Start Kafka
1 | igloo:kafka root# bin/kafka-server-start.sh config/server.properties |
- Create a new Kafka topic named βtestβ
1 | igloo:kafka root# bin/kafka-topics.sh --create --zookeeper localhost:2181 --replication-factor 1 --partitions 1 --topic test |
- Initialise Producer in Console
1 | terrence@igloo /usr/local/kafka_2.12-2.1.0 |
- Initialize Consumer in Console to receive the messages
1 | terrence@igloo /usr/local/kafka_2.12-2.1.0 |
Run Kafka Manager, an UI tool for managing Kafka.
1 | terrence@igloo ~/bin/kafka-manager-1.3.3.18 |
Then visit http://localhost:9000
Create a Kafka cluster at first:
Visit βtestβ topic in Kafka cluster: