@@ -281,9 +281,9 @@ flowchart TD
281281``` mermaid
282282graph TD
283283 subgraph AOP["PaymentAspect (AOP)"]
284- R["@Ready\nPaymentApprovalService .ready()"]
285- T["@PaymentBillingApproveTrace\ncreatePaymentBillingApprove ()"]
286- C["@Cancel\nPaymentCancellationService .executeCancel()"]
284+ R["@Ready<br/>PaymentApprovalService .ready()"]
285+ T["@PaymentBillingApproveTrace<br/>createPaymentBillingApprove ()"]
286+ C["@Cancel<br/>PaymentCancellationService .executeCancel()"]
287287 end
288288
289289 R -->|중복 있음| R1["기존 paymentId 반환 (멱등성)"]
@@ -304,22 +304,21 @@ graph TD
304304
305305``` mermaid
306306graph LR
307- subgraph Published["Payment Service → Kafka"]
308- E1["payment.succeeded\nPaymentSucceededEvent"]
309- E2["payment.refunded\nPaymentRefundedEvent"]
310- E3["payment-auth.required\nAuthRequiredEvent"]
307+ subgraph Published["Payment 서버 → Kafka"]
308+ E1["결제 처리 완료"]
309+ E2["결제 환불 완료"]
311310 end
312311
313- subgraph Subscribed["Kafka → Payment Service "]
314- E4["order.created\nOrderCreatedEvent "]
315- E5["order.cancelled\nOrderCancelledEvent "]
312+ subgraph Subscribed["Kafka → Payment 서버 "]
313+ E4["결제 요청 "]
314+ E5["결제 취소 요청 "]
316315 end
317316
318- Outbox["p_payment_outbox\n (Outbox Pattern)"] --> E1 & E2 & E3
319- E4 --> L1["PaymentListener\n→ PaymentApproveWorkflow 시작"]
320- E5 --> L2["PaymentListener\n→ PaymentCancelWorkflow 시작"]
317+ Outbox["p_payment_outbox<br/> (Outbox Pattern)"] --> E1 & E2
318+ E4 --> L1["결제 로직 시작"]
319+ E5 --> L2["결제 취소 로직 시작"]
321320
322- Cleanup["PaymentOutboxCleanupService\n매일 03:00, 7일 이상 삭제"] -.->|cleanup| Outbox
321+ Cleanup["매일 03:00, 7일 이상 지난<br/> 데이터 삭제"] -.->|cleanup| Outbox
323322```
324323
325324---
@@ -349,17 +348,17 @@ public TossPaymentResponse requestBillingPayment(...) { ... }
349348
350349``` mermaid
351350flowchart LR
352- Activity["PaymentActivities\n (Temporal)"] --> Retry
351+ Activity["PaymentActivities<br/> (Temporal)"] --> Retry
353352
354- subgraph R4J["Resilience4j 3중 보호 "]
353+ subgraph R4J["Resilience4j"]
355354 direction LR
356- Retry["Retry\n실패 시 재시도"] --> CB["Circuit Breaker\n연속 실패 시 차단"]
357- CB --> BH["Bulkhead\n동시 요청 수 제한\n(Semaphore) "]
355+ Retry["Retry<br/>실패 시 재시도"] --> CB["Circuit Breaker<br/>연속 실패 시 차단"]
356+ CB --> BH["Bulkhead<br/>동시 요청 수 제한"]
358357 end
359358
360359 BH --> Toss["Toss Payments API"]
361360
362- CB -->|OPEN 상태| Fallback["즉시 예외 반환\n (Temporal이 재시도 처리)"]
361+ CB -->|OPEN 상태| Fallback["즉시 예외 반환<br/> (Temporal이 재시도 처리)"]
363362```
364363
365364### Circuit Breaker 상태 전환
@@ -377,8 +376,6 @@ stateDiagram-v2
377376 OPEN --> HALF_OPEN : 대기 시간 경과 후 일부 요청 허용
378377 note right of OPEN
379378 모든 요청 즉시 차단
380- CallNotPermittedException 발생
381- → Temporal Activity가 재시도 스케줄링
382379 end note
383380
384381 HALF_OPEN --> CLOSED : 테스트 요청 성공
0 commit comments