-
-
Notifications
You must be signed in to change notification settings - Fork 8
/
create-kafka-topics.sh
executable file
·26 lines (21 loc) · 1.05 KB
/
create-kafka-topics.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
#!/usr/bin/env bash
echo
echo "Create topic spring.kafka.news"
echo "------------------------------"
docker exec -t zookeeper kafka-topics --create --bootstrap-server kafka:9092 --replication-factor 1 --partitions 5 --topic spring.kafka.news
echo
echo "Create topic spring.kafka.alert"
echo "-------------------------------"
docker exec -t zookeeper kafka-topics --create --bootstrap-server kafka:9092 --replication-factor 1 --partitions 5 --topic spring.kafka.alert
echo
echo "Create topic spring.cloud.stream.news"
echo "-------------------------------------"
docker exec -t zookeeper kafka-topics --create --bootstrap-server kafka:9092 --replication-factor 1 --partitions 5 --topic spring.cloud.stream.news
echo
echo "Create topic spring.cloud.stream.alert"
echo "--------------------------------------"
docker exec -t zookeeper kafka-topics --create --bootstrap-server kafka:9092 --replication-factor 1 --partitions 5 --topic spring.cloud.stream.alert
echo
echo "List topics"
echo "-----------"
docker exec -t zookeeper kafka-topics --list --bootstrap-server kafka:9092