-
Notifications
You must be signed in to change notification settings - Fork 18
/
kafka-setup.sh
executable file
·40 lines (32 loc) · 1.32 KB
/
kafka-setup.sh
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
40
docker exec -it kafka kafka-topics.sh \
--create --topic accounts \
--partitions 1 \
--config cleanup.policy=compact,delete \
--config retention.ms=600000 \
--bootstrap-server localhost:9092
docker exec -it kafka kafka-topics.sh \
--create --topic customers \
--partitions 1 \
--config cleanup.policy=compact,delete \
--config retention.ms=600000 \
--bootstrap-server localhost:9092
docker exec -it kafka kafka-topics.sh \
--create --topic transactions \
--partitions 5 \
--bootstrap-server localhost:9092
docker exec -it kafka kafka-topics.sh \
--create --topic transactions.credit \
--partitions 5 \
--bootstrap-server localhost:9092
docker exec -it kafka kafka-topics.sh \
--create --topic transactions.debit \
--partitions 5 \
--bootstrap-server localhost:9092
docker exec -it kafka kafka-topics.sh --bootstrap-server localhost:9092 --list
docker exec -it kafka kafka-topics.sh --describe --topic accounts --bootstrap-server localhost:9092
docker exec -it kafka kafka-topics.sh --describe --topic customers --bootstrap-server localhost:9092
docker exec -it kafka kafka-topics.sh --list --bootstrap-server localhost:9092
docker exec -it kafka kafka-console-consumer.sh \
--topic transactions \
--from-beginning \
--bootstrap-server localhost:9092