File tree Expand file tree Collapse file tree
apps/commerce-api/src/main/java/com/loopers/infrastructure/outbox Expand file tree Collapse file tree Original file line number Diff line number Diff line change 99import lombok .RequiredArgsConstructor ;
1010import lombok .extern .slf4j .Slf4j ;
1111import org .springframework .stereotype .Component ;
12+ import org .springframework .transaction .annotation .Propagation ;
13+ import org .springframework .transaction .annotation .Transactional ;
1214import org .springframework .transaction .event .TransactionPhase ;
1315import org .springframework .transaction .event .TransactionalEventListener ;
1416
@@ -98,6 +100,7 @@ public void handleProductUnliked(ProductUnlikedEvent event) {
98100 * 상품 조회 이벤트 → Outbox 저장
99101 */
100102 @ TransactionalEventListener (phase = TransactionPhase .BEFORE_COMMIT )
103+ @ Transactional (propagation = Propagation .REQUIRES_NEW )
101104 public void handleProductViewed (ProductViewedEvent event ) {
102105 log .debug ("[Outbox] ProductViewedEvent 수신 - productId: {}" , event .productId ());
103106
You can’t perform that action at this time.
0 commit comments