File tree Expand file tree Collapse file tree 2 files changed +24
-2
lines changed
src/main/java/org/myteam/server/chat/config Expand file tree Collapse file tree 2 files changed +24
-2
lines changed Original file line number Diff line number Diff line change @@ -28,4 +28,26 @@ services:
2828 DB_NAME : ${DB_NAME}
2929 DB_PASSWORD : ${DB_PASSWORD}
3030 SLACK_WEBHOOK_URL : ${SLACK_WEBHOOK_URL}
31- restart : always # 컨테이너가 중단되었을 때 재시작 설정
31+ restart : always # 컨테이너가 중단되었을 때 재시작 설정
32+
33+ zookeeper :
34+ image : confluentinc/cp-zookeeper:latest
35+ container_name : zookeeper
36+ environment :
37+ ZOOKEEPER_CLIENT_PORT : 2181
38+ ports :
39+ - " 2181:2181"
40+
41+ kafka :
42+ image : confluentinc/cp-kafka:latest
43+ container_name : kafka
44+ ports :
45+ - " 9092:9092"
46+ environment :
47+ KAFKA_BROKER_ID : 1
48+ KAFKA_ZOOKEEPER_CONNECT : zookeeper:2181
49+ KAFKA_ADVERTISED_LISTENERS : PLAINTEXT://localhost:9092
50+ KAFKA_LISTENER_SECURITY_PROTOCOL_MAP : PLAINTEXT:PLAINTEXT
51+ KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR : 1
52+ depends_on :
53+ - zookeeper
Original file line number Diff line number Diff line change 2222@ Configuration
2323public class KafkaConfig {
2424
25- private static final String BOOTSTRAP_SERVERS = "localhost :9092" ;
25+ private static final String BOOTSTRAP_SERVERS = "kafka :9092" ;
2626 private static final String DEFAULT_GROUP_ID = "chat-group" ;
2727
2828 @ Bean
You can’t perform that action at this time.
0 commit comments