Repository navigation
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 59 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
github-actions
Bot
requested review from
jjunh33,
leegain1,
sangrae2325 and
xeoxxn
October 14, 2026 06:38
tnals0924
added this pull request to stack #122
October 14, 2026 07:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
#️⃣연관된 이슈
🎯 해결하려는 문제가 무엇인가요?
사용자 행동 직후에 가는 즉시 알림 4종을 실제로 보냅니다. 이 PR부터 아웃박스 → 릴레이 → 리스너 → 발송이 한 줄로 이어집니다.
EventApplicationServiceImpl.applyEventAppliedEventApplicationServiceImpl.cancelApplicationEventApplicationCanceledLockerApplicationServiceImpl.applyLockerAssignedNoticeServiceImpl.createNoticeCreated❓ 왜 해결해야 하나요?
#117(아웃박스)과 #118(발송 공통 처리)만으로는 이벤트를 기록하는 곳과 받는 곳이 없어 알림이 나가지 않습니다.
⭐ 어떻게 해결했나요?
core:commoncommon.event): 위 4종을DomainEvent를 구현한 record로 추가했습니다. ID와 원시값만 담고, 행사명은 알림 문구에 쓰려고 발행 시점 값을 싣습니다(리스너가 event 모듈을 조회할 수 없어서).OutboxWriter를 주입받아 저장 직후 같은 트랜잭션에서 이벤트를 기록합니다. 신청이 롤백되면 알림 기록도 함께 사라집니다.NoticeServiceImpl.create에는 지금까지@Transactional이 없었습니다(저장은 Spring Datasave의 트랜잭션에만 의존). 공지 저장과 이벤트 기록이 함께 커밋되도록@Transactional을 붙였습니다.OutboxWriter는 트랜잭션 밖에서 부르면 실패합니다.NotificationEventListener, membernotification/service/impl): 이벤트마다NotificationType과 수신자를 정해NotificationDispatcher를 부릅니다. 이동 대상 ID는 행사 →eventId, 사물함 →lockerPeriodId, 공지 →noticeId입니다.LockerApplicationServiceImplTest가 서비스 생성자를 직접 호출해서, 아무것도 하지 않는OutboxWriter(event -> {})를 넘기도록 한 줄 고쳤습니다.🧩 이 PR의 한계 & 트레이드오프
ModularityTests·DomainImplAccessTests까지 확인했습니다. 로컬에 DB와 Docker가 없어 아웃박스부터 FCM까지 실제로 흐르는지는 확인하지 못했습니다. 이 스택에서 처음으로 끝까지 이어지는 PR이라 dev에서 아래를 확인해야 합니다.PUSH_TYPE=log로 행사 신청 →outbox_events가PUBLISHED가 되는지,notifications에 행이 생기는지, "푸시 발송(로그 모드)" 로그가 찍히는지⛓️ 기존 기능에 미치는 영향
outbox_eventsINSERT가 한 건씩 늘어납니다. 응답과 API 형식은 그대로입니다.AdminNoticeWriteUseCase의 "파일 확인과 공지 저장을 한 트랜잭션으로 묶지 않는다"는 의도는 그대로입니다(UseCase에는 트랜잭션이 없음).🔀 Edge Case & 실패 시나리오
FAILED📋 검토한 대안과 선택 이유
💬 리뷰 포인트
NoticeServiceImpl.create에@Transactional을 붙인 것