-
Notifications
You must be signed in to change notification settings - Fork 0
/
requirements.txt
39 lines (31 loc) · 1.2 KB
/
requirements.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
wget https://downloads.apache.org/kafka/3.3.2/kafka_2.12-3.3.2.tgz
tar -xvf kafka_2.12-3.3.2.tgz
-------------------------------
java -version
sudo yum install java-1.8*
java -version
cd kafka_2.12-3.3.2
Start Zoo-keeper:
-------------------------------
bin/zookeeper-server-start.sh config/zookeeper.properties
Start Kafka-server:
----------------------------------------
Duplicate the session & enter in a new console --
export KAFKA_HEAP_OPTS="-Xmx256M -Xms128M"
cd kafka_2.12-3.3.2
bin/kafka-server-start.sh config/server.properties
Change private ip to public IP
Do a "sudo nano config/server.properties" - change ADVERTISED_LISTENERS to public ip of the EC2 instance
Create the topic:
-----------------------------
Duplicate the session & enter in a new console --
cd kafka_2.12-3.3.2
bin/kafka-topics.sh --create --topic demo_test --bootstrap-server `public_ip` --replication-factor 1 --partitions 1
Start Producer:
--------------------------
bin/kafka-console-producer.sh --topic demo_test --bootstrap-server `public_ip`
Start Consumer:
-------------------------
Duplicate the session & enter in a new console --
cd kafka_2.12-3.3.2
bin/kafka-console-consumer.sh --topic demo_test --bootstrap-server `public_ip`