728x90
Spring Cloud Bus
micro service들이 가동중에도 config server의 변경된 것들이 적용되게끔 해주는 것.
AMQP
Advanced Message Queuing Protocol
비동기적으로 무언갈 함
RabbitMQ
- Messaging Broker,
- It is an intermediary for messaging,
- It gives applications a common platform to send and receive messages, and for messages a safe place to live until they are received.
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-bus-amqp</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>
actuator - help monitoring ms
config 설정 다이나믹하게 하고싶은 ms에 amqp디펜던시 모두 추가
설정을 바꾸고 모든 ms에 적용하려면 POST /bus-refresh config server에 보내야함.
config server properties파일에
management.endpoints.web.exposure.include=busrefresh
RabbitMq깔기
https://evandde.github.io/chocolatey/
초코깔기
https://www.rabbitmq.com/install-windows.html
rabbitMq 깔기
https://oingdaddy.tistory.com/165
설치 후 실행 참고
rabbitmq 필요한 곳에 다 추가.
spring.rabbitmq.host=localhost
spring.rabbitmq.port=5672
spring.rabbitmq.username=guest
spring.rabbitmq.password=guest
configuration 바꾸고
broadcast를 위해 config server에 post리퀘 보내보기
Post로!
https://docs.spring.io/spring-cloud-bus/docs/current/reference/html/
728x90
'study > Spring' 카테고리의 다른 글
AmigosCode small exercise in Spring Boot Full Stack with React.js (0) | 2022.12.17 |
---|---|
Spring API Gateway filter rewritePath (0) | 2022.10.20 |
Spring Cloud API Gateway (0) | 2022.10.12 |
Eureka Discovery Service (0) | 2022.10.10 |
exception에 에러메세지 안나올때 (0) | 2022.10.01 |
댓글