[Feat]: 유저 도메인 및 Adapter 이벤트 정의 및 SNS 토픽 발행 로직 구현 #156
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue number
작업한 이유
서버 간 강한 결합 문제를 최소화 하기 위해 다른 서비스(커뮤니티 서비스등)에서 자체적으로 유저 정보를 가지고 있기 위함. -> 시스템 이벤트를 발행해 데이터 정합성을 유지하기 위해 작업하였습니다.
작업 사항
이벤트 처리 흐름
도메인 이벤트 발행(Application) TX1 -> Adapter에서 Handle(AdapterEvent로 변환) TX1 -> DataModelEvent로 변환 후 RDB에 저장 TX1 -> 저장 이벤트 발행(Application) TX1 -> 이벤트 조회 후 Message System에 발행 TX2 -> 이벤트 발행 완료 처리 TX2
TX2가 실패시 스케줄러에 의해 재발행됩니다.
DDL