-
Notifications
You must be signed in to change notification settings - Fork 1
Issue 1,23 #25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Issue 1,23 #25
Conversation
| user.signOut() | ||
| userPort.patch(user) | ||
| userEventPublishPort.publishUserSignedOutEvent(UserSignedOutEvent(user.id)) | ||
| transactionalOperator.executeAndAwait { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'reactive transcation'을 제어하기위한 오퍼레이터 입니다.
콜백접근 방식과 코루틴 연산자를 제공하여 해당 연산자를 채택하였습니다.
'ReactiveTransactionManager'는 반드시 Mono, Flux 등의 reactor 연산자를 제공해야 합니다.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
UserSignedOutEvent 생성 하는 영역을 User 애그리거트 안쪽으로 옮겨서 User 애그리거트에게 이벤트 생성 책임을 지우면 어떨까요?
참고: https://www.baeldung.com/spring-data-ddd
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
좋은의견 감사합니다!
회원탈퇴에 의해 발생된 '이벤트 발행 객체'가 오로지 User 애그리거트에게 책임을 지울수있는 형태이니 의견주신 디자인을 적용해도 괜찮은 것 같습니다.
| userPort.patch(user) | ||
| userEventPublishPort.publishUserSignedOutEvent(UserSignedOutEvent(user.id)) | ||
| transactionalOperator.executeAndAwait { | ||
| val user = getUserUseCase.getById(userId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Hee-jin506 님, 의견주신대로 코드 수정하여 반영했습니다.
JPA가 아니다보니, 서비스레이어에 코드가 한줄 늘어버렸네요 ㅜㅜ
#1 #23
Type
개요
리액티브 트랜잭션을 제어하여 트랜잭션 커밋 이후에 Integration Publisher가 수행되도록 로직을 수정함.
작업 내용