Asignment Kafka 24025010
Asignment Kafka 24025010
Học Viên Cao Học: Ngô Tiến Anh - Mã Học Viên: 24025010
Install JAVA
2. Install OpenJDK
java -version
1. Download the Apache Kafka binary files from the official website.
wget https://downloads.apache.org/kafka/3.8.0/kafka_2.12-3.8.0.tgz
delete.topic.enable = true
cd kafka_2.12-3.8.0
bin/zookeeper-server-start.sh config/zookeeper.properties
cd kafka_2.12-3.8.0
bin/kafka-server-start.sh config/server.properties
Create a Topic
cd kafka_2.12-3.8.0
3. Generate a list of all the topics on the cluster with the --list option:
return result:
test-events
Requires=network.target remote-fs.target
After=network.target remote-fs.target
[Service]
Type=simple
ExecStart=/home/kafka/kafka_2.13-3.7.0/bin/zookeeper-server-start.sh
/home/kafka/kafka_2.13-3.7.0/config/zookeeper.properties
ExecStop=/home/kafka/kafka_2.13-3.7.0/bin/zookeeper-server-stop.sh
Restart=on-abnormal
WantedBy=multi-user.target
Requires=zookeeper.service
After=zookeeper.service
Environment="JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64"
ExecStart=/home/kafka/kafka_2.13-3.7.0/bin/kafka-server-start.sh /home/kafka/kafka_2.13-
3.7.0/config/server.properties
ExecStop=/home/kafka/kafka_2.13-3.7.0/bin/kafka-server-stop.sh
Restart=on-abnormal
WantedBy=multi-user.target
Remove logs