티스토리 뷰

그동안 Actuator를 활용해서 Refresh를 통해서 변경된 서버설정값을 가져갔습니다. 물론 이용안하는 것보다는 편하지만, 포스팅을 따라하셨던 분들이라면, 지속적으로 Refresh하는 과정이 번거롭다는 생각이 드셨을 거에요.

 이러한 문제점을 해결하기 위해서 나온게 바로 Spring Cloud Bus 입니다.

Spring Cloud Bus를 활용하면, 한번의 Refresh로  Bus와 연결되어있는 모든 Service를 Refresh하게 됩니다. 기존에는Gateway-Service,User-Service 마다 각각 Refresh해줘야 했던 반면, Spring Cloud Bus를 활요하면 한번의 Refresh만으로도 작업이 완료가 된다는 의미입니다! 

다만 Spring Cloud Bus를 활용하기전에 RabbitMQ라는 어플리케이션을 설치해야합니다.


#Rabbit MQ 설치

 

1. Erlang 설치 

먼저 RabbitMQ 설치에 앞서 Erlang을 설치해야합니다.

https://www.erlang.org/downloads

 

Index - Erlang/OTP

The official home of the Erlang Programming Language

www.erlang.org

 

위의 사진으로 설치했을때 이슈가 발생했습니다. 최신버젼으로 받아주세요 현제 제 기준 24.3.3 버젼입니다.

 

Default 설정으로 설치를 진행해주시구 Close는 눌러주세요.

마지막으로 설치위치를 환경변수에 추가해주시면 Elrang은 설치가 완료됩니다.

2. RabbitMQ 설치

https://rabbitmq.com/install-windows.html#installer

 

Installing on Windows — RabbitMQ

Installing on Windows This guide covers RabbitMQ installation on Windows. It focuses on the two recommended installation options: The guide also covers a few post-installation topics in the context of Windows: and more. These topics are covered in more det

rabbitmq.com

해당 URL접속 후 다음 항목을 다운로드 받아주세요.

해당 화면이 나오면 전부 Default설정으로 설치를 진행하시면 됩니다.

다음으로는 서비스로 들어가서 ( Windows 검색에 서비스 검색 후 진입)

RabbitMQ가 실행 중이라면 성공 ( 실행 중이 아니라면 실행시켜주세요!)

마찬가지로 환경변수를 추가해줍니다.

마지막으로 plugin을 적용시킬건데 해당 항목은 PowerShell 환경에서 실행해야합니다.


#Test

마지막으로 테스트를 진행 합니다.

localshot:15672 로 접속 시 다음과 같은 화면이 출력된다면 성공입니다.

초기 Username과 Password는 Guest 입니다.

 

다음과 같은 화면이 정상적으로 출력되나요? 그렇다면 성공입니다!

이것으로 Spring Cloud Bus를 사용하기 위한 사전준비는 완료입니다. 다음에는 실제로

프로젝트에서 Spring Cloud Bus를 사용해보겠습니다.

감사합니다.

공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2024/09   »
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 27 28
29 30
글 보관함