-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
19 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
#!/bin/bash | ||
|
||
KAFKA_BROKER="kafka:9092" | ||
TOPIC="chat-topic" | ||
|
||
# Kafka가 응답하는지 확인하기 위한 반복문 | ||
until docker exec kafka kafka-topics.sh --list --bootstrap-server $KAFKA_BROKER; do | ||
echo "Waiting for Kafka to be ready..." | ||
sleep 5 | ||
done | ||
|
||
# Kafka가 준비되었으면, 토픽 생성 | ||
docker exec kafka kafka-topics.sh --create \ | ||
--bootstrap-server $KAFKA_BROKER \ | ||
--replication-factor 1 \ | ||
--partitions 3 \ | ||
--topic $TOPIC | ||
|
||
echo "Topic '$TOPIC' created." | ||
##!/bin/bash | ||
# | ||
#KAFKA_BROKER="kafka:9092" | ||
#TOPIC="chat-topic" | ||
# | ||
## Kafka가 응답하는지 확인하기 위한 반복문 | ||
#until docker exec kafka kafka-topics.sh --list --bootstrap-server $KAFKA_BROKER; do | ||
# echo "Waiting for Kafka to be ready..." | ||
# sleep 5 | ||
#done | ||
# | ||
## Kafka가 준비되었으면, 토픽 생성 | ||
#docker exec kafka kafka-topics.sh --create \ | ||
# --bootstrap-server $KAFKA_BROKER \ | ||
# --replication-factor 1 \ | ||
# --partitions 3 \ | ||
# --topic $TOPIC | ||
# | ||
#echo "Topic '$TOPIC' created." |