File tree Expand file tree Collapse file tree 2 files changed +16
-5
lines changed
java/org/example/tablenow/global/config Expand file tree Collapse file tree 2 files changed +16
-5
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,13 @@ public class WebSocketConfig implements WebSocketMessageBrokerConfigurer {
2727 private final JwtHandshakeInterceptor jwtHandshakeInterceptor ;
2828 private final RabbitMQProperties rabbitMQProperties ;
2929
30+ @ Value ("${spring.rabbitmq.host}" )
31+ private String rabbitMqHost ;
32+
33+ @ Value ("${spring.rabbitmq.port}" )
34+ private int rabbitMqPort ;
35+
36+
3037 @ Value ("${chat.broker}" )
3138 private String brokerType ;
3239
@@ -49,8 +56,8 @@ public void configureMessageBroker(MessageBrokerRegistry registry) {
4956 } else if ("rabbit" .equalsIgnoreCase (brokerType )) {
5057 // [RabbitMQ Relay] MQ로 relay
5158 registry .enableStompBrokerRelay (WebSocketConstants .TOPIC_PREFIX_RELAY )
52- .setRelayHost ("localhost" ) // RabbitMQ 서버 주소
53- .setRelayPort (61613 ) // RabbitMQ STOMP 포트 (TCP)
59+ .setRelayHost (rabbitMqHost ) // RabbitMQ 서버 주소
60+ .setRelayPort (rabbitMqPort ) // RabbitMQ STOMP 포트 (TCP)
5461 .setSystemLogin (rabbitMQProperties .getUsername ())
5562 .setSystemPasscode (rabbitMQProperties .getPassword ())
5663 .setClientLogin (rabbitMQProperties .getUsername ())
Original file line number Diff line number Diff line change @@ -53,15 +53,19 @@ spring:
5353 type : redis
5454
5555 rabbitmq :
56- host : localhost
57- port : 5672
56+ host : ${RABBITMQ_HOST}
57+ port : ${RABBITMQ_PORT}
5858 username : ${RABBITMQ_USER}
5959 password : ${RABBITMQ_PASSWORD}
60+ ssl :
61+ enabled : ${RABBITMQ_SSL}
6062
6163redisson :
6264 config :
6365 singleServerConfig :
6466 address : " redis://localhost:6379"
6567
6668chat :
67- broker : rabbit # or simple
69+ broker : rabbit # or simple
70+
71+
You can’t perform that action at this time.
0 commit comments