Spring Boot ๊ธฐ๋ฐ commerce orchestration backend์ ๋๋ค.
์ด ํ๋ก์ ํธ๋ ์ปค๋จธ์ค ์ฃผ๋ฌธ API ์์ฒด๋ณด๋ค, ์ฃผ๋ฌธ ์ดํ ์ด์ด์ง๋ payment ยท settlement ยท notification ยท outbox publish ํ๋ฆ์์ ๋ฐ์ํ๋ ์ํ ๋ถ์ผ์น, ์คํจ ๋ถ๊ธฐ, ๋ณต๊ตฌ ๊ฒฝ๋ก๋ฅผ ์ด๋ป๊ฒ ์ ์ดํ ๊ฒ์ธ๊ฐ์ ์ด์ ์ ๋ก๋๋ค.
์ฃผ๋ฌธ ์ดํ ํ์ ์ฒ๋ฆฌ๋ฅผ ๋จ์ ์์ฐจ ํธ์ถ๋ก ํฉ๋ฟ๋ฆฌ์ง ์๊ณ , CommerceOrchestrationService๋ฅผ ์ค์ฌ์ผ๋ก ๋ช
์์ ์ํ ์ ์ด, failure branching, compensation, retry/dead-letter, admin reprocessing ํ๋ฆ์ผ๋ก ์ถ์ ๊ฐ๋ฅํ๊ฒ ๊ตฌ์ฑํ์ต๋๋ค.
์ด ๋ ํฌ๋ pinned ๋ํ ํฌํธํด๋ฆฌ์ค ๋ ํฌ๋ก, "์ปค๋จธ์ค ๊ฑฐ๋ ํ๋ฆ์์ ์ํยท์ ํฉ์ฑยท์คํจ ๋ณต๊ตฌ๋ฅผ ์ด๋ป๊ฒ ์ค๊ณํ๊ณ , ์ด๋๊น์ง ๊ฒ์ฆํ๋๊ฐ"๋ฅผ ์งง์ ์๊ฐ ์์ ์ดํด์ํค๋ ๊ฒ์ ๋ชฉํ๋ก ํฉ๋๋ค.
ํต์ฌ ํฌ์ธํธ๋ ์ธ ๊ฐ์ง์ ๋๋ค.
- ๋ฌด์์ ์ ์ดํ๋:
order ์ดํ payment, settlement, notification, outbox publish๋ฅผ ํ๋์ orchestration ํ๋ฆ์ผ๋ก ์ ์ดํ๊ณ , ๊ฐ ๋จ๊ณ์ ์ํ ์ ์ด์ ์คํจ ์ง์ ์ ๋ฐ์ดํฐ๋ก ๋จ๊น๋๋ค. - ๋ฌด์์ ์ฆ๋ช
ํ๋:
์ปค๋จธ์ค ๊ฑฐ๋ ํ๋ฆ์์ ์ค์ํ explicit state transition, failure branching, compensation, retry/dead-letter, admin reprocessing, Modulith boundary, Flyway + integration-test ๊ธฐ์ค์ ์ ํจ๊ป ๋ณด์ฌ์ค๋๋ค. - ์ด๋๋ฅผ ๋ณด๋ฉด ๋๋:
๋จผ์ ์ด README์์ ์ ์ฒด ๋ฌธ์ ์ ์์ ๊ฒ์ฆ ๋ฒ์๋ฅผ ๋ณด๊ณ , ์ด์ด์ Docs Index, Architecture Notes, Flow Notes๋ฅผ ๋ณด๋ฉด ๋ฉ๋๋ค.
์ด ๋ ํฌ๋ CRUD ํ๋ฉด ์๋ ์๋ํฌ์ธํธ ์๋ณด๋ค ์๋๋ฅผ ๋จผ์ ์ฆ๋ช ํ๋ ๋ฐ ์ด์ ์ ๋ก๋๋ค.
CommerceOrchestrationService๋ฅผ ์ค์ฌ์ผ๋ก order lifecycle๊ณผ ํ์ ๊ฑฐ๋ ํ๋ฆ์ ๋ช ์์ ์ผ๋ก ์ ์ดํ๋ ๊ฒ- ์ํ ์ ์ด, ์คํจ ๋ถ๊ธฐ, ์ด์ ๋ณต๊ตฌ ์ง์ ์
order status,orchestration step,outbox event,notification event,audit log๋ก ๋จ๊ธฐ๋ ๊ฒ - settlement ์คํจ์ notification ์คํจ๋ฅผ ๊ฐ์ ์ค๋ฅ๋ก ๋ญ๊ฐ์ง ์๊ณ , ์๋ก ๋ค๋ฅธ ๋ณด์ / ์ฌ์ฒ๋ฆฌ / ๋ฌด์ ๊ฐ๋ฅ ์คํจ ์ ์ฑ ์ผ๋ก ๋ถ๋ฆฌํ๋ ๊ฒ
- outbox retry/dead-letter์ notification retry/manual intervention ํ๋ฆ์ ํตํด ์คํจ ํ ๋ณต๊ตฌ ๊ฐ๋ฅํ ์ด์ ์ง์ ์ ๋๋ฌ๋ด๋ ๊ฒ
- Spring Modulith ๊ธฐ์ค์ผ๋ก module boundary๋ฅผ ๊ฒ์ฆํ๊ณ , Testcontainers ๊ธฐ๋ฐ integration test๋ก ์ค์ ํ๋ฆ์ ํ์ธํ๋ ๊ฒ
์ฒ์ ๋ณด๋ ์ฌ๋ ๊ธฐ์ค ๊ถ์ฅ ์ฝ๊ธฐ ์์๋ ์๋์ ๋๋ค.
- ๋ฌธ์ ๊ตฌ์กฐ: Docs Index
- Modulith / ํจํค์ง ๊ตฌ์กฐ: Architecture Notes
- Order / Payment / Settlement ํ๋ฆ: Flow Notes
- ๊ธฐ์ ์ ํ ๊ทผ๊ฑฐ: Technical Decisions
- ๊ธฐ์ ๊ฒํ ํฌ์ธํธ: Technical Discussion Points
- ์ค๊ณ ๊ฒฐ์ ๊ณผ Trade-off: Design Notes
- ๊ตฌํ ๊ฒํ / Boundary ํ๋จ: Implementation Review Notes
- ๊ตฌํ-๊ฒ์ฆ ๋งคํ: Verification Matrix
- AI-assisted ๊ฒ์ฆ ๊ธฐ์ค: AI-assisted Development & Verification / Claim Audit
- Future Scope ์ค๊ณ: Payment Timeout Confirmation Flow / Provider Callback Flow Review
- ์ด์ ๊ด์ธก์ฑ: Observability Alert Candidates & Metric Naming
- OpenAPI / ApiDog: OpenAPI Spec / OpenAPI Guide
- ํ ์คํธ ๊ฒฐ๊ณผ / ์ด์ ๋์: Test Report / Troubleshooting
ํ๋ก์ ํธ ์ค๊ณ ์๋์ ๊ตฌํ ๋ฒ์๋ Velog ๊ธ์์๋ ์ ๋ฆฌํ์ต๋๋ค.
- ์ปค๋จธ์ค ์ฃผ๋ฌธ ์ดํ ํ๋ฆ์ ์ํ ์ ์ด์ Orchestration์ผ๋ก ์ค๊ณํ๊ธฐ
- Outbox ์ฌ์ฒ๋ฆฌ ๊ตฌ์กฐ์์ ์ค๋ณต ์ฒ๋ฆฌ์ ๋ฉฑ๋ฑ์ฑ์ ์ค๊ณํ๊ธฐ
draw.io ์์ฐ์ Diagram Guide ๊ธฐ์ค์ผ๋ก ๊ด๋ฆฌํฉ๋๋ค.
ํ์ฌ overall architecture๋ README ๋ํ ์ด๋ฏธ์ง๋ก๋ง ์ ์งํ๊ณ , ์ธ๋ถ ํ๋ฆ๊ณผ ํ
์ด๋ธ ๊ด๊ณ๋ Architecture Notes / Flow Notes / Diagram Guide์์ ์ด์ด์ ํ์ธํ ์ ์์ต๋๋ค.
์ด ๊ทธ๋ฆผ์ ํ์ฌ ๊ตฌํ ๊ธฐ์ค์ overall architecture๋ฅผ ํ ์ฅ์ผ๋ก ์์ฝํ ๋ฏธ๋ฆฌ๋ณด๊ธฐ์ ๋๋ค.
- overall architecture PNG:
commerce_orchestration_overall_architecture.png - draw.io ์๋ณธ:
commerce_orchestration_overall_architecture.drawio - PDF:
commerce_orchestration_overall_architecture.pdf
์ด ํ๋ก์ ํธ์ ์ฃผ์ ํ๋ฆ๊ณผ ์ต๊ทผ reliability hardening ์์ ์ ์๋ ๋ค์ด์ด๊ทธ๋จ์ผ๋ก ์ ๋ฆฌํ์ต๋๋ค.
| Diagram | Purpose |
|---|---|
| Overall Architecture | ์ฃผ๋ฌธ ์ดํ payment, settlement, notification, outbox ํ๋ฆ์ ์ ์ฒด ๊ตฌ์กฐ |
| Notification Recovery Flow | notification ์คํจ ์ดํ retry/manual intervention ํ๋ฆ |
| Outbox Retry / Dead Letter | outbox publish ์คํจ ์ดํ retry/dead-letter ํ๋ฆ |
| Reliability Hardening Overview | payment idempotency, retry claim, publisher adapter ๋ณด๊ฐ ์์ฝ |
| Payment Idempotency Flow | paymentRequestId ๊ธฐ๋ฐ ์ค๋ณต ๊ฒฐ์ ์์ฒญ ์ ์ด |
| Notification / Outbox Processing Claim Flow | PROCESSING claim ๊ธฐ๋ฐ ์ค๋ณต ์ฌ์ฒ๋ฆฌ ์ ์ด |
| Outbox Publisher Adapter | Outbox ์ํ ๊ด๋ฆฌ์ Kafka ๋ฐํ ๊ตฌํ ๋ถ๋ฆฌ |
- ์ญํ :
์ฃผ๋ฌธ ์์ฑ ์ดํ payment, settlement, notification, outbox publish๋ฅผ orchestration ๊ด์ ์์ ์ ์ดํ๋ backend - ํต์ฌ ๋ฌธ์ :
๊ฒฐ์ ์ฑ๊ณต ์ดํ ์ ์ฐ ์คํจ, ์๋ฆผ ์คํจ, ์ด๋ฒคํธ ๋ฐํ ์คํจ์ฒ๋ผ ์ผ๋ถ ํ์ ์ฒ๋ฆฌ๋ง ์คํจํ์ ๋ ๋ด๋ถ ์ํ๋ฅผ ์ด๋ป๊ฒ ๋จ๊ธฐ๊ณ ๋ณต๊ตฌํ ๊ฒ์ธ๊ฐ - ๊ฐ์ :
explicit state transition, compensation ๋ถ๋ฆฌ, notification retry/manual/ignore ์ ์ฑ , outbox retry/dead-letter, admin reprocessing, idempotency/claim ๊ธฐ๋ฐ reliability hardening - ๊ฑฐ๋/์ฐ๋ ๊ด์ :
์ธ๋ถ payment provider ์ฐ๋ ๊ณจ๊ฒฉ, settlement failure compensation, outbox ๊ธฐ๋ฐ ํ์ publish ๋ถ๋ฆฌ๋ฅผ ํตํด ๊ฑฐ๋ ํ๋ฆ์ ์ ํฉ์ฑ๊ณผ ๋ณต๊ตฌ ๊ฐ๋ฅ์ฑ์ ๋ณด์ฌ์ค๋๋ค. - ๋ชจ๋ ๊ตฌ์กฐ:
Spring Modulith ๊ธฐ๋ฐ์ผ๋ก*.api๊ณต๊ฐ ๊ณ์ฝ๊ณผApplicationModules.verify()๊ฒ์ฆ์ ์ฌ์ฉํฉ๋๋ค. - ์์กด์ฑ ์ํ:
ํ์ฌ build.gradle์ ๊ฒ์ฆ๋ ๊ตฌํ ๋ฒ์ ๊ธฐ์ค์ผ๋ก ์ ๋ฆฌ๋์ด ์์ต๋๋ค.
Spring MVC + WebClient + Security + JPA/Flyway + Kafka + Modulith + Testcontainers ์กฐํฉ์ ์ ์งํฉ๋๋ค. - ํ์ฌ ๋ก์ปฌ ๊ฒ์ฆ:
./gradlew clean test --rerun-tasks,
./gradlew clean integrationTest --rerun-tasks --stacktrace๊ธฐ์ค ํต๊ณผ - ํ์ฌ CI ์ํ:
GitHub Actions๋build-and-test,integration-test๋ job์ผ๋ก ์ ์ง ์ค์ด๋ฉฐ, compile/test/integration ๊ฒ์ฆ ์๋ฏธ๋ฅผ ์ ์งํฉ๋๋ค.
- ์ฃผ๋ฌธ ์ดํ ํ์ ์์ ์ controller ๋จ์๋ก ํฉ๋ฟ๋ฆฌ์ง ์๊ณ orchestration service์์ ํ๋ฆ ์ค์ฌ์ผ๋ก ์ ์ดํฉ๋๋ค.
- ์ฃผ๋ฌธ ์ํ ์ ์ด๋ ๋ฌต์์ ์ฒ๋ฆฌ ๋์ ๋ช ์์ ์ํ ๋ณ๊ฒฝ์ผ๋ก ๊ธฐ๋ก๋ฉ๋๋ค.
- payment / settlement / notification / outbox ์คํจ๋ฅผ ์๋ก ๋ค๋ฅธ ์ ์ฑ ์ผ๋ก ๋ถ๊ธฐํฉ๋๋ค.
paymentRequestId๊ธฐ์ค ๊ฒฐ์ ๋ฉฑ๋ฑ์ฑ์ผ๋ก ๋์ผ ์น์ธ ์์ฒญ replay ์ provider ์ค๋ณต ํธ์ถ์ ๋ฐฉ์งํฉ๋๋ค.- settlement ์คํจ๋ payment cancel compensation ํ๋ฆ์ผ๋ก ์ฒ๋ฆฌํฉ๋๋ค.
- notification ์คํจ๋
AUTO_RETRY,MANUAL_INTERVENTION,IGNORE์ ์ฑ ์ผ๋ก ๋ถ๊ธฐํฉ๋๋ค. RETRY_SCHEDULEDnotification event๋PROCESSINGclaim ์ดํ due processor๋ฅผ ํตํด ์ฌ์ฒ๋ฆฌํ ์ ์์ต๋๋ค.- outbox๋ฅผ ํตํด ํ์ ์ด๋ฒคํธ ๋ฐํ์ ๋ถ๋ฆฌํ๊ณ ,
READY/RETRY_WAITevent๋ฅผPROCESSING์ผ๋ก ์ ์ ํ ๋ค publishํฉ๋๋ค. - Outbox ์ํ ๊ด๋ฆฌ์ Kafka ๋ฐํ ๊ตฌํ์
OutboxEventPublisheradapter๋ก ๋ถ๋ฆฌํ์ต๋๋ค. - ์ด์์๋ ์ ์ฒด orchestration ์ฌ์คํ์ด ์๋๋ผ ์คํจํ ํ์ ์ฒ๋ฆฌ ๋จ์๋ฅผ admin ์ฌ์ฒ๋ฆฌ API๋ก ๋ณต๊ตฌํ ์ ์์ต๋๋ค.
- Spring Modulith ๊ธฐ์ค์ผ๋ก domain module์ ๊ณต๊ฐ API์ ๋ด๋ถ ๊ตฌํ ๊ฒฝ๊ณ๋ฅผ ๊ฒ์ฆํฉ๋๋ค.
- Testcontainers ๊ธฐ๋ฐ PostgreSQL / Kafka integration test๋ก ์ฃผ์ ์ํ ์ ์ด์ ๋ณต๊ตฌ ํ๋ฆ์ ๊ฒ์ฆํฉ๋๋ค.
์ต๊ทผ ๋ณด๊ฐ์์๋ ์ฃผ๋ฌธ ์ดํ ํ๋ฆ์์ ๋ฐ์ํ ์ ์๋ ์ค๋ณต ์์ฒญ๊ณผ ์ฌ์ฒ๋ฆฌ ๋์ ์คํ ๊ฐ๋ฅ์ฑ์ ์ค์ด๊ธฐ ์ํด paymentRequestId ๊ธฐ๋ฐ ๊ฒฐ์ ๋ฉฑ๋ฑ์ฑ, notification/outbox PROCESSING claim, Outbox publisher adapter ๋ถ๋ฆฌ๋ฅผ ์ถ๊ฐํ์ต๋๋ค.
- Payment Idempotency: ๊ฐ์
paymentRequestId๋ก ์น์ธ ์์ฒญ์ด ๋ฐ๋ณต๋๋ฉด provider๋ฅผ ๋ค์ ํธ์ถํ์ง ์๊ณ ๊ธฐ์กด payment ๊ธฐ์ค ์๋ต์ ๋ฐํํฉ๋๋ค. - Notification Retry Claim: due
RETRY_SCHEDULEDevent๋ฅผPROCESSING์ผ๋ก ์ ์ ํ ์คํ์๋ง retry ์ฒ๋ฆฌ๋ฅผ ์ํํ๊ณ , ์ ์ ์คํจ๋ skipped๋ก ์ง๊ณํฉ๋๋ค. - Outbox Publisher Adapter:
OutboxPublisherService๋ retry/dead-letter ์ํ ์ ์ด๋ง ๋ด๋นํ๊ณ , Kafka ๋ฐํ์KafkaOutboxEventPublisher๊ฐ ๋ด๋นํฉ๋๋ค. - Outbox Publish Claim:
READY/RETRY_WAITevent๋ฅผPROCESSING์ผ๋ก ์ ์ ํ ๋ค publishํด ์ค๋ณต ๋ฐํ ๊ฐ๋ฅ์ฑ์ ์ค์ ๋๋ค.
- Outbox publish, notification retry, admin recovery ๊ฒฝ๊ณ์ Micrometer counter์ key-value structured log๋ฅผ ์ถ๊ฐํ์ต๋๋ค. ์ ์ฒด ๊ด์ธก/๋ณต๊ตฌ ํ๋ฆ์ Observability Recovery Architecture Diagram์์ ํ์ธํ ์ ์์ต๋๋ค.
- ์ด ์งํ์ ๋ก๊ทธ๋ retry/dead-letter ์ฆ๊ฐ, claim skipped, admin recovery ๊ฒฐ๊ณผ๋ฅผ ํ์ธํ๊ธฐ ์ํ ์ด์ ๊ด์ธก์ฑ ๊ธฐ์ค์ ๋๋ค.
- alert ํ๋ณด์ metric tag ๊ธฐ์ค์ Observability Alert Candidates & Metric Naming์ ์ ๋ฆฌํ์ต๋๋ค. Prometheus/Grafana dashboard์ alert rule ๊ตฌํ์ Future Scope์ ๋๋ค.
- ์์ธํ ๋ณต๊ตฌ ์ ์ฐจ๋ Admin Recovery Runbook์์ ํ์ธํ ์ ์์ต๋๋ค.
์ปค๋จธ์ค ์ฃผ๋ฌธ ์ดํ์๋ ๊ฒฐ์ ์น์ธ, ์ ์ฐ ์์ฒญ, ์๋ฆผ ๋ฐ์ก, ์ด๋ฒคํธ ๋ฐํ, ์คํจ ๋ณต๊ตฌ๊ฐ ์ด์ด์ง๋๋ค.
์ค์ ์ด์ ํ๊ฒฝ์์๋ ๋ชจ๋ ํ์ ์ฒ๋ฆฌ๊ฐ ํ ๋ฒ์ ์ฑ๊ณตํ์ง ์์ต๋๋ค. ์๋ฅผ ๋ค์ด ๊ฒฐ์ ๋ ์ฑ๊ณตํ์ง๋ง ์ ์ฐ ์์ฒญ์ด ์คํจํ๊ฑฐ๋, ๊ฑฐ๋ ์์ฒด๋ ์๋ฃ๋์ง๋ง ์๋ฆผ ๋ฐ์ก ๋๋ ํ์ ์ด๋ฒคํธ ๋ฐํ๋ง ์คํจํ ์ ์์ต๋๋ค. ์ด๋ ์ค์ํ ๋ฌธ์ ๋ ๋จ์ rollback์ด ์๋๋ผ, ์ด๋ ๋จ๊ณ๊น์ง ์ฑ๊ณตํ๋์ง, ์ด๋์ ์คํจํ๋์ง, ์ด๋ค ๋จ์๋ก ์ฌ์ฒ๋ฆฌํ ์ ์๋์ง๋ฅผ ๋ช ํํ ๋จ๊ธฐ๋ ๊ฒ์ ๋๋ค.
์ด ๋ ํฌ๋ ์ฃผ๋ฌธ ์ดํ ํ์ ํ๋ฆ์ ์ฌ๋ฌ controller์ ad-hoc service ํธ์ถ์ ๋ถ์ฐ์ํค์ง ์๊ณ , ๋ช ์์ ์ํ ์ ์ด์ ์ด์ ๋ณต๊ตฌ ๊ฒฝ๋ก๊ฐ ๋ณด์ด๋ orchestration backend๋ก ์ ๋ฆฌํ๋ ๊ฒ์ ๋ชฉํ๋ก ํฉ๋๋ค.
ํ์ฌ ๊ธฐ์ค์ ์ ์๋์ ๊ฐ์ต๋๋ค.
- ๋น์ฆ๋์ค ์ธ๋ถ ์ง์
์ ์
OrderController์ ๋๋ค. - ์ธ์ฆ์ฉ
AuthController๋ ๋ฐ๋ชจ JWT ๋ฐ๊ธ ๋ณด์กฐ ์๋ํฌ์ธํธ๋ง ์ ๊ณตํฉ๋๋ค. CommerceOrchestrationService๋ ์ฃผ๋ฌธ ์ดํ ํ๋ฆ ์ ์ด๋ฅผ ๋ด๋นํฉ๋๋ค.NotificationRetryProcessor๋RETRY_SCHEDULEDnotification event์ due retry ์ฒ๋ฆฌ๋ฅผ ๋ด๋นํฉ๋๋ค.payment,settlement,notification,outbox,audit๋ ๊ฐ์ ์๊ธฐ repository๋ฅผ ๋ด๋ถ service๊ฐ ์์ ํฉ๋๋ค.- ๊ฒฐ์ provider๋
PaymentProviderClient์ธํฐํ์ด์ค ์๋mock/external๊ตฌํ์ผ๋ก ๋ถ๋ฆฌ๋์ด ์์ต๋๋ค. - outbox๋
READY / RETRY_WAIT -> PROCESSING -> PUBLISHED / RETRY_WAIT / DEAD_LETTER์ํ๋ฅผ ์ฌ์ฉํฉ๋๋ค. - settlement ์คํจ์ notification ์คํจ๋ ๋์ผ ๋ณด์ ์ ์ฑ ์ผ๋ก ์ฒ๋ฆฌํ์ง ์์ต๋๋ค.
- admin์
notification-events,outbox-events๋จ์๋ก ๋ช ์์ ์ฌ์ฒ๋ฆฌ๋ฅผ ์ํํ ์ ์์ต๋๋ค. - DB ์คํค๋ง์ source of truth๋ Flyway migration์ ๋๋ค.
POST /api/orders๋ก ์ฃผ๋ฌธ์ ์์ฑํฉ๋๋ค.POST /api/orders/{orderId}/orchestrate๊ฐ ํธ์ถ๋๋ฉด orchestration์ด ์์๋ฉ๋๋ค.- payment ์น์ธ ํ ์ฃผ๋ฌธ์
PAID๋ก ์ ์ดํฉ๋๋ค. - settlement ์์ฒญ ํ ์ฃผ๋ฌธ์
SETTLEMENT_REQUESTED๋ก ์ ์ดํ๊ณ outbox event๋ฅผ ๋จ๊น๋๋ค. - notification ์์ฒญ ํ ์ฃผ๋ฌธ์
NOTIFICATION_REQUESTED๋ก ์ ์ดํ๊ณ outbox event๋ฅผ ๋จ๊น๋๋ค. - ์ต์ข
์ ์ผ๋ก
COMPLETED, ๋๋ ์คํจ ๋ถ๊ธฐ์ ๋ฐ๋ผFAILED/CANCELLED๋ก ์ข ๋ฃํฉ๋๋ค.
order
์ฃผ๋ฌธ ์์ฑ, ์ํ ์ ์ด, ์ธ๋ถ ๋น์ฆ๋์ค ์ง์ facadeorchestration
ํ๋ฆ ์ ์ด, orchestration step ๊ธฐ๋ก, notification retry processor ์กฐํฉpayment
๊ฒฐ์ ์น์ธ/์ทจ์์ provider ์ฐ๋ ์ถ์ํsettlement
์ ์ฐ ์์ฒญ ๊ธฐ๋กnotification
์๋ฆผ ์์ฒญ ๊ธฐ๋ก, ์คํจ ์ ์ฑ , retry ์ํ ๊ด๋ฆฌoutbox
์ด๋ฒคํธ ์ ์ฅ, ์ฌ์๋, publish, dead-letter ์ ํaudit
๋ถ๊ธฐ/์ฌ์คํ/์คํจ ๊ธฐ๋กadmin
notification / outbox ์ด์ ์ฌ์ฒ๋ฆฌ APIcommon
๊ณตํต ์๋ต, ์์ธ, ๊ณตํต ๊ธฐ๋ฐ ํ์
controller -> facade/service -> repositoryorchestration -> domain application contract- ๋ค๋ฅธ domain์ repository๋ฅผ ์ง์ ์ฃผ์ ํด์ ํ๋ฆ์ ์ ์ดํ์ง ์์ต๋๋ค.
- repository ํจํค์ง๋ฅผ ์ธ๋ถ์ ๊ณต๊ฐํ๋ ๋ฐฉ์๋ณด๋ค
*.api๊ณต๊ฐ ๊ณ์ฝ์ ํตํด ํ๋ ฅํ๋ ๋ฐฉ์์ ์ฐ์ ํฉ๋๋ค. - Spring Modulith์
@NamedInterface("api")์allowedDependencies๋ฅผ ํตํด module boundary๋ฅผ ๋ช ์ํฉ๋๋ค.
- ์ฃผ๋ฌธ ์ดํ ๊ฑฐ๋ ํ๋ฆ์ payment, settlement, notification, outbox publish์ฒ๋ผ ์๋ก ๋ค๋ฅธ ์คํจ ๊ฐ๋ฅ์ฑ๊ณผ ๋ณต๊ตฌ ๊ธฐ์ค์ ๊ฐ์ง ๋จ๊ณ๋ก ์ด์ด์ง๊ธฐ ๋๋ฌธ์, ํ๋ฆ ์ ์ด๋ฅผ ํ๊ณณ์ ๋ชจ์ ๋ถ๊ธฐ์ ์ข ๋ฃ ์กฐ๊ฑด์ ์ฝ๊ธฐ ์ฝ๊ฒ ์ ์งํฉ๋๋ค.
- ์ํ ์ ์ด์ ๋ณด์ ๊ฒฝ๋ก๋ฅผ ๋ช ์์ ์ผ๋ก ๋จ๊ฒจ "์ด๋๊น์ง ์ฑ๊ณตํ๊ณ , ์ด๋์ ์คํจํ์ผ๋ฉฐ, ์ด๋ค ๋จ์๋ก ๋ณต๊ตฌํ ์ ์๋๊ฐ"๋ฅผ ์ถ์ ๊ฐ๋ฅํ๊ฒ ๋ง๋ญ๋๋ค.
- settlement ์คํจ๋ ๊ฑฐ๋ ์ ํฉ์ฑ์ ์ํฅ์ ์ฃผ๋ ์คํจ๋ก ๋ณด๊ณ payment cancel compensation๊น์ง ์ฐ๊ฒฐํฉ๋๋ค.
- notification ์คํจ๋ ๊ฑฐ๋ ์์ฒด๋ฅผ ๋๋๋ฆด ์คํจ๊ฐ ์๋๋ฏ๋ก ๋จ์ rollback ๋์ retry / manual intervention / ignore ์ ์ฑ ์ผ๋ก ๋ถ๋ฆฌํฉ๋๋ค.
- outbox๋ฅผ ๋ณ๋ ๊ด๋ฆฌํด ํ์ publish์ ์ฌ์๋์ dead-letter ์ ํ์ ๋น์ฆ๋์ค ์ฒ๋ฆฌ์ ๋ถ๋ฆฌํฉ๋๋ค.
- ๊ฐ domain์ ๋ด๋ถ ๊ตฌํ์ ์จ๊ธฐ๊ณ , orchestration์ ๊ณต๊ฐ๋ application contract๋ง ์กฐํฉํ๋๋ก ๊ตฌ์ฑํฉ๋๋ค.
PaymentProviderClient๋ ๋ ๊ตฌํ ์ค ํ๋๊ฐ ์ค์ ์ผ๋ก ์ ํ๋ฉ๋๋ค.
mock
MockPaymentProviderClient
๊ธฐ๋ณธ ๋ชจ๋์ ๋๋ค.PAYMENT_PROVIDER_MOCK_FAILURE_TOKEN์ด description์ ํฌํจ๋๋ฉด ์คํจ๋ฅผ ์๋ฎฌ๋ ์ด์ ํฉ๋๋ค.PAYMENT_TIMEOUT_UNKNOWN์ด description์ ํฌํจ๋๋ฉด ์ค์ PG ์ฐ๋์ด ์๋ mock unknown scenario๋ก payment๋ฅผCONFIRMATION_REQUIRED์ํ๋ก ๋จ๊น๋๋ค.external
ExternalPaymentProviderClient
baseUrl,apiKey,approvePath,cancelPath,connectTimeout,readTimeout๋ฅผ ์ฌ์ฉํฉ๋๋ค.
ํ์ฌ external ๊ตฌํ์ ์ค์ ์ฐ๋์ ๋ถ์ผ ์ ์๋ ๊ณจ๊ฒฉ๊ณผ ์ค๋ฅ ๋งคํ๊น์ง ํฌํจํ์ง๋ง, provider๋ณ ์์ธ error mapping๊ณผ retry policy๋ ํ์ ๊ณผ์ ์ ๋๋ค.
๊ฒฐ์ ์น์ธ ํ๋ฆ์ orchestration์์ ์์ฑํ deterministic key์ธ
"ORDER-" + orderId + "-PAYMENT-APPROVE"๋ฅผ paymentRequestId๋ก ์ ๋ฌํฉ๋๋ค.
๊ฐ์ ์ฃผ๋ฌธ orchestration replay์์๋ ๋์ผ key๊ฐ ์ ์ง๋๋ฉฐ,
์ด๋ฏธ ์ ์ฅ๋ payment๊ฐ ์์ผ๋ฉด provider approve๋ฅผ ๋ค์ ํธ์ถํ์ง ์์ต๋๋ค.
providerTransactionId ์ปฌ๋ผ๊ณผ ์กฐํ ํฌํธ๋ ์ธ๋ถ callback ๋ฉฑ๋ฑ์ฑ ํ์ฅ์ ์ํ ์ค๋น ์ง์ ์ด๋ฉฐ,
callback flow ์์ฒด๋ ์์ง ๊ตฌํํ์ง ์์์ต๋๋ค.
- outbox event๋ settlement / notification ํ์ publish์ฉ์ผ๋ก ์ ์ฅ๋ฉ๋๋ค.
- publisher๋
nextAttemptAt์ด ์ง๋READY,RETRY_WAIT์ด๋ฒคํธ๋ง ๋ฐํ ๋์์ผ๋ก ๊ฐ์ ธ์ต๋๋ค. - ๋ฐํ ์ DB ์กฐ๊ฑด๋ถ update๋ก
PROCESSING์ํ๋ฅผ ์ ์ ํ ์ด๋ฒคํธ๋ง publishํฉ๋๋ค. - ์ค์ Kafka ๋ฐํ์
OutboxEventPublisher๊ตฌํ์ฒด์ธKafkaOutboxEventPublisher๊ฐ ๋ด๋นํฉ๋๋ค. - publish ์คํจ ์
retryCount,failureCode,failureReason,nextAttemptAt์ด ๊ฐฑ์ ๋ฉ๋๋ค. maxRetryCount๋ฅผ ์ด๊ณผํ๋ฉดDEAD_LETTER๋ก ์ ํ๋ฉ๋๋ค.
- settlement ์คํจ:
payment ์ทจ์ ๋ณด์์ ์ํํ๊ณ ์ฃผ๋ฌธ์CANCELLED๋ก ๋ง๋ฌด๋ฆฌํฉ๋๋ค. - notification ์คํจ:
payment/settlement๋ฅผ ๋๋๋ฆฌ์ง ์๊ณ notification policy์ ๋ฐ๋ผAUTO_RETRY,MANUAL_INTERVENTION,IGNORE๋ก ๋ถ๊ธฐํฉ๋๋ค.
AUTO_RETRY
notification event๋ฅผRETRY_SCHEDULED๋ก ๋จ๊ธฐ๊ณ ,nextAttemptAt์ดํ due processor๊ฐ ์ฌ์ฒ๋ฆฌํ ์ ์์ต๋๋ค.MANUAL_INTERVENTION
์ด์์ ํ์ธ์ด ํ์ํ๋ฉฐ notification event๋ฅผMANUAL_INTERVENTION_REQUIRED๋ก ๋จ๊น๋๋ค.IGNORE
ํ์ฌ ๋ฒ์์์ ์ฃผ๋ฌธ ์๋ฃ๋ฅผ ๋ง์ง ์์๋ ๋๋ ์คํจ๋ก ๋ณด๊ณIGNORED์ฒ๋ฆฌํฉ๋๋ค.
NotificationRetryProcessor๋ due retry ๋์๋ง ์กฐํํ๊ณ , ์ฒ๋ฆฌ ์ PROCESSING claim์ ํ๋ํ ์ด๋ฒคํธ๋ง ์ฒ๋ฆฌํฉ๋๋ค.
- ์ฑ๊ณต ์ notification event๋ฅผ
SENT๋ก ์ ํํ๊ณ order๋ฅผCOMPLETED๋ก ๋ณต๊ตฌํฉ๋๋ค. - future retry event๋ ์ฒ๋ฆฌํ์ง ์์ต๋๋ค.
- claim์ ์คํจํ due event๋ ์ค๋ณต ์คํ์ผ๋ก ๋ณด๊ณ
skippedCount๋ก ์ง๊ณํฉ๋๋ค. - ๋ฐ๋ณต ์คํจ ์ backoff ์ฌ์ค์ผ์ค ๋๋
MANUAL_INTERVENTION_REQUIRED์ ํ์ ์ํํฉ๋๋ค.
๊ธฐ๋ณธ ์ค์ ์์๋ notification.retry.scheduler.enabled=false๋ก ๋นํ์ฑํ๋์ด ์์ต๋๋ค.
์์ฑ์ ์ผ๋ฉด property-gated NotificationRetryScheduler๊ฐ NotificationRetryProcessor๋ฅผ ์ฃผ๊ธฐ์ ์ผ๋ก ํธ์ถํฉ๋๋ค.
์ด์์๋ POST /api/admin/notification-events/retry-due๋ก due notification retry batch๋ฅผ ์๋ ์คํํ ์ ์์ต๋๋ค.
์๋ต์ status, processedCount, successCount, failedCount, skippedCount, processedEventIds๋ฅผ ํฌํจํฉ๋๋ค.
POST /api/admin/notification-events/{id}/retry
notification ์คํจ ๊ฑด์ ์ฌ์ ์ก ์ฑ๊ณต์ผ๋ก ์ฒ๋ฆฌํ๊ณ ์ฃผ๋ฌธ์COMPLETED๋ก ๋ณต๊ตฌํฉ๋๋ค. ์๋ต์eventId,orderId,action=RETRY,result=SUCCESS,previousStatus,currentStatus,message๋ฅผ ํฌํจํฉ๋๋ค.POST /api/admin/notification-events/{id}/ignore
๋ฌด์ ๊ฐ๋ฅํ notification ์คํจ ๊ฑด์IGNORED๋ก ์ ๋ฆฌํ๊ณ ์ฃผ๋ฌธ์COMPLETED๋ก ๋ณต๊ตฌํฉ๋๋ค. ์๋ต์eventId,orderId,action=IGNORE,result=IGNORED,previousStatus,currentStatus,message๋ฅผ ํฌํจํฉ๋๋ค.POST /api/admin/outbox-events/{id}/retry
DEAD_LETTERoutbox event๋ง ๋์์ผ๋ก ์ฆ์ ์ฌ๋ฐํ์ ์๋ํฉ๋๋ค. ์๋ต์eventId,aggregateId,eventType,action=RETRY_DEAD_LETTER,result,previousStatus,currentStatus,retryCount,failureCode,failureReason,message๋ฅผ ํฌํจํฉ๋๋ค.
์ธ admin ์ฌ์ฒ๋ฆฌ API๋ ์ ํ์ request body๋ก operatorId, reason์ ๋ฐ์ ์ ์์ต๋๋ค.
๊ธฐ์กด์ฒ๋ผ body ์์ด ํธ์ถํด๋ ๋์ํ๋ฉฐ,
body๊ฐ ์๊ฑฐ๋ ๊ฐ์ด ๋น์ด ์์ผ๋ฉด audit detail์๋ operatorId=unknown, reason=not-provided๊ฐ ๊ธฐ๋ก๋ฉ๋๋ค.
operatorId์ reason์ trim/truncate ํ audit detail์๋ง ๋ฐ์ํ๊ณ metric tag๋ log field์๋ ๋ฃ์ง ์์ต๋๋ค.
ํ์ฌ admin ์ฌ์ฒ๋ฆฌ๋ ์ ์ฒด orchestration ์ฌ์คํ์ด ์๋๋ผ, ์คํจํ ํ์ ์ฒ๋ฆฌ ๋จ์๋ฅผ ๋ช ์์ ์ผ๋ก ๋ณต๊ตฌํ๋ ๋ฐฉ์์ ๋๋ค.
์ด ๋ ํฌ๋ "ํ๋ฆ ์ ์ด์ ์คํจ ์ฒ๋ฆฌ ๊ตฌ์กฐ๊ฐ ์ค์ ๋ก ๋์ํ๋๊ฐ"๋ฅผ ํ์ฌ ๊ธฐ์ค์ผ๋ก ์๋๊น์ง ๊ฒ์ฆํฉ๋๋ค.
./gradlew compileJava
๋ฉ์ธ ์์ค ์ปดํ์ผ ํ์ธ./gradlew test
H2 + MockMvc ์ค์ฌ ๋จ์/ํ๋ฆ ๊ฒ์ฆ./gradlew integrationTest
PostgreSQL/Kafka Testcontainers ๊ธฐ๋ฐ ํตํฉ ๊ฒ์ฆ
ํ์ฌ ์ค์ ๊ตฌํ ๋ฐ ๊ฒ์ฆ ๋ฒ์๋ ์๋๋ฅผ ํฌํจํฉ๋๋ค.
- order create / detail / flow API
- JWT ๋ฐ๊ธ ๋ฐ
/api/**๋ณดํธ - orchestration happy path
- settlement failure compensation
- notification failure ๋ถ๊ธฐ์ ignore policy
- admin notification / outbox reprocessing
- outbox publish ์ํ ์ ์ด
- PostgreSQL / Kafka ๊ธฐ๋ฐ outbox happy path integration test
- PostgreSQL / Kafka ๊ธฐ๋ฐ outbox retry -> dead-letter integration test
- notification AUTO_RETRY due processor
- RETRY_SCHEDULED notification event ์ฌ์ฒ๋ฆฌ
- retry ์ฑ๊ณต ์ notification
SENT๋ฐ orderCOMPLETED๋ณต๊ตฌ - future retry event skip
- ๋ฐ๋ณต ์คํจ ์ retry backoff ๋๋
MANUAL_INTERVENTION_REQUIRED์ ํ - Spring Modulith
ApplicationModules.verify()๊ธฐ๋ฐ module boundary ๊ฒ์ฆ
GitHub Actions workflow๋ ์๋ ๋ job์ ์ํํฉ๋๋ค.
build-and-test
compileJava,test, unit report uploadintegration-test
integrationTest, integration report upload
์ด๋ฒ ์ ๋ฆฌ ์์ ์ ๋ก์ปฌ ์ฌ๊ฒ์ฆ์์๋ test, integrationTest ๊ธฐ์ค์ ์ ๋ค์ ํ์ธํ์ต๋๋ค.
README์์๋ ๊ตฌํ ๋ฒ์๋ฅผ ๊ณผ์ฅํ์ง ์๊ณ , "๋ฌด์์ ๊ฒ์ฆํ๋ ๋ ํฌ์ธ์ง"์ "์ด๋๊น์ง ํ์ธํ๋์ง"๋ฅผ ๋ถ๋ฆฌํด ์ ์ต๋๋ค.
- ๋ฌธ์ ์ง์ ์ : Docs Index
- ๊ตฌ์กฐ ์ค๋ช : Architecture Notes
- ํ๋ฆ ์ค๋ช : Flow Notes
- ๋ค์ด์ด๊ทธ๋จ ๊ฐ์ด๋: Diagram Guide
ํ์ฌ ์๋ draw.io ์์ฐ์ ๊ด๋ฆฌํฉ๋๋ค.
- overall architecture
- overall architecture reference
- order orchestration flow
- outbox retry / dead-letter flow
- notification retry / manual intervention flow
- table relation overview
์๋๋ ํ์ฌ๋ ํ์ ๊ณผ์ ๋ก ์ ์งํ๋ ํญ๋ชฉ์ ๋๋ค.
- ์ค์ payment provider๋ณ timeout / retry / error mapping ๊ณ ๋ํ
- WebClient timeout ์ดํ provider confirmation flow ์ค๊ณ ๋ฌธ์: Payment Timeout Confirmation Flow
ํ์ฌ๋ mock/dummy provider ๊ธฐ๋ฐ
CONFIRMATION_REQUIRED์ํ ๊ธฐ๋ก๊น์ง๋ง ๊ตฌํ๋์ด ์์ต๋๋ค. ์ค์ external provider confirmation ์์ฒญ, admin confirmation API, OpenAPI path๋ Future Scope์ ๋๋ค. - provider callback flow ๊ตฌํ ํ๋จ ๋ฌธ์: Provider Callback Flow Review ํ์ฌ๋ Future Scope / Design Review์ด๋ฉฐ production code, OpenAPI path, automated test๋ก ๊ตฌํ๋์ด ์์ง ์์ต๋๋ค.
- notification ์ฑ๋๋ณ retry policy ์ธ๋ถํ
- dead-letter ์ด๋ฒคํธ์ ์ด์ ์๋ํ
- refresh token / key rotation / user store ์ฐ๋
- admin ๋ ๋ฒจ ์ฌ์ฒ๋ฆฌ / ์ฌ๊ฒ์ฆ API ๊ณ ๋ํ
- provider callback API์ full WebClient timeout confirmation flow ๊ตฌํ
์งง๊ฒ ๋งํด ์ด ํ๋ก์ ํธ๋ CRUD showcase๋ณด๋ค๋ ์ปค๋จธ์ค ๊ฑฐ๋ ํ๋ฆ์ orchestration, explicit state transition, failure handling, compensation, retry/dead-letter, ์ด์ ๋ณต๊ตฌ ์ง์ ์ ๋ณด์ฌ์ฃผ๋ ํฌํธํด๋ฆฌ์ค ์ฑ๊ฒฉ์ด ๊ฐํฉ๋๋ค.
์ด ํ๋ก์ ํธ์ ์ฃผ์ ์ค๊ณ ์ ํ์ ์๋ ๊ด์ ์์ ์ค๋ช ํ ์ ์์ต๋๋ค. ์์ธ ์ค๊ณ ๊ทผ๊ฑฐ, ๊ตฌํ ๊ทผ๊ฑฐ, ๊ฒ์ฆ ๊ทผ๊ฑฐ, Boundary๋ Technical Discussion Points์ Technical Decisions์์ ํ์ธํ ์ ์์ต๋๋ค.
์ฃผ๋ฌธ ์ดํ์๋ payment, settlement, notification, outbox publish์ฒ๋ผ
์๋ก ๋ค๋ฅธ ์คํจ ๊ฐ๋ฅ์ฑ๊ณผ ๋ณต๊ตฌ ๊ธฐ์ค์ ๊ฐ์ง ํ์ ํ๋ฆ์ด ์ด์ด์ง๋๋ค.
์ด ํ๋ฆ์ ๊ฐ service์ ํฉ๋ฟ๋ฆฌ๋ฉด
์ด๋๊น์ง ์ฑ๊ณตํ๊ณ , ์ด๋์ ์คํจํ์ผ๋ฉฐ, ์ด๋ค ๋จ์๋ก ๋ณต๊ตฌํ ์ ์๋์ง ํ์
ํ๊ธฐ ์ด๋ ต์ต๋๋ค.
๊ทธ๋์ CommerceOrchestrationService๋ฅผ ์ค์ฌ์ผ๋ก ์ ์ฒด ํ๋ฆ์ ์ฝํ๊ฒ ๋ง๋ค๊ณ ,
๊ฐ domain์ ๊ณต๊ฐ API ๊ณ์ฝ์ ํตํด ํ๋ ฅํ๋๋ก ๋ถ๋ฆฌํ์ต๋๋ค.
payment ์คํจ, settlement ์คํจ, notification ์คํจ, outbox publish ์คํจ๋
์ฃผ๋ฌธ ์ ์ฒด์ ๋ฏธ์น๋ ์ํฅ์ด ๋ค๋ฆ
๋๋ค.
payment ์คํจ๋ ์ฃผ๋ฌธ ์๋ฃ๋ฅผ ๋ง์์ผ ํ์ง๋ง,
notification ์คํจ๋ ์ฃผ๋ฌธ ์์ฒด๋ฅผ ๋๋๋ฆฌ๊ธฐ๋ณด๋ค retry, manual intervention, ignore ์ ์ฑ
์ผ๋ก ๋ถ๋ฆฌํ๋ ํธ์ด ๋ ์์ฐ์ค๋ฝ์ต๋๋ค.
๋ฐ๋ผ์ ์คํจ๋ฅผ ๋จ์ exception์ผ๋ก๋ง ์ฒ๋ฆฌํ์ง ์๊ณ ,
์ํ์ ์ฌ์ฒ๋ฆฌ ๊ธฐ์ค์ผ๋ก ๋จ๊ธฐ๋ ๊ตฌ์กฐ๋ฅผ ์ ํํ์ต๋๋ค.
- ์ํ ์ ์ด ์ค์ฌ์ ๊ฑฐ๋ ํ๋ฆ ์ค๊ณ
- ์คํจ ์ง์ ๋ณ ๋ณด์ / ์ฌ์๋ / ์๋ ๊ฐ์ ๋ถ๋ฆฌ
- Outbox ๊ธฐ๋ฐ ํ์ ์ด๋ฒคํธ ๋ฐํ ๋ถ๋ฆฌ
- Spring Modulith ๊ธฐ๋ฐ module boundary ๊ฒ์ฆ
- Testcontainers ๊ธฐ๋ฐ PostgreSQL / Kafka integration test
- ์ด์์๊ฐ ๋ณต๊ตฌํ ์ ์๋ admin reprocessing ํ๋ฆ
- Java 21
- Docker
docker compose up -d
SPRING_PROFILES_ACTIVE=local ./gradlew bootRun๊ธฐ๋ณธ ๋ก์ปฌ ๊ฐ์ ์๋๋ฅผ ์ฌ์ฉํฉ๋๋ค.
- PostgreSQL:
jdbc:postgresql://localhost:5432/commerce_orchestration - Kafka:
localhost:9092 - Kafka UI:
http://localhost:8085 - payment provider mode:
mock
.env.example์ ์ฐธ๊ณ ํด ํ๊ฒฝ๋ณ์๋ฅผ ๋ง์ถ ์ ์์ต๋๋ค.
SPRING_PROFILES_ACTIVE=local \
PAYMENT_PROVIDER_MODE=external \
PAYMENT_PROVIDER_BASE_URL=http://localhost:8089 \
./gradlew bootRunDB ์คํค๋ง๋ Flyway migration์ ๊ธฐ์ค์ผ๋ก ๊ด๋ฆฌํฉ๋๋ค.
- ์ด๊ธฐ ์คํค๋ง: V1__init.sql
- outbox retry / dead-letter ๋ณ๊ฒฝ: V2__outbox_retry_dead_letter.sql
- notification admin policy ๋ณ๊ฒฝ: V3__notification_admin_policy.sql
์ ํ๋ฆฌ์ผ์ด์
๊ธฐ๋ณธ/๋ก์ปฌ/ํตํฉ ํ
์คํธ ํ๋กํ์ Flyway๋ฅผ ์ ์ฉํ ๋ค JPA ddl-auto=validate๋ก ๋งคํ ์ ํฉ์ฑ์ ํ์ธํฉ๋๋ค.
๋จ์ ํ
์คํธ์ฉ test ํ๋กํ๋ง H2 create-drop๊ณผ flyway disabled๋ฅผ ์ ์งํฉ๋๋ค.
์ด์ ์ ๊ฒ์ฉ SQL์ docs/sql์ ์ ๋ฆฌ๋์ด ์์ต๋๋ค.
AUTO_RETRY
์ผ์์ ์คํจ๋ก ๊ฐ์ฃผํ๋ฉฐ notification event๋ฅผRETRY_SCHEDULED๋ก ๋จ๊น๋๋ค.
due ์์ ์ด ๋ ์ด๋ฒคํธ๋NotificationRetryProcessor๋ฅผ ํตํด ์ฌ์ฒ๋ฆฌ๋๋ฉฐ, scheduler๋ ๊ธฐ๋ณธ ๋นํ์ฑ ์ํ์์ property๋ก ํ์ฑํํ ์ ์์ต๋๋ค. ์ด์์๋POST /api/admin/notification-events/retry-due๋ก ๋์ผ trigger๋ฅผ ์๋ ์คํํ ์ ์๊ณ , batch ์ฒ๋ฆฌ ๊ฒฐ๊ณผ ์์ฝ๊ณผ ์ฒ๋ฆฌ๋ event id ๋ชฉ๋ก์ ํจ๊ป ๋ฐํํฉ๋๋ค.MANUAL_INTERVENTION
์ด์์ ํ์ธ์ด ํ์ํ๋ฉฐ notification event๋ฅผMANUAL_INTERVENTION_REQUIRED๋ก ๋จ๊น๋๋ค.IGNORE
ํ์ฌ ๋ฒ์์์ ์ฃผ๋ฌธ ์๋ฃ๋ฅผ ๋ง์ง ์์๋ ๋๋ ์คํจ๋ก ๋ณด๊ณIGNORED์ฒ๋ฆฌํฉ๋๋ค.
ํ์ฌ mock ๋ถ๊ธฐ ๊ธฐ์ค์ ์๋ description ํ ํฐ์ผ๋ก ์๋ฎฌ๋ ์ด์ ํฉ๋๋ค.
FAIL_NOTIFICATION_RETRYFAIL_NOTIFICATION_MANUALFAIL_NOTIFICATION_IGNOREFAIL_NOTIFICATION
- Velog: ์ปค๋จธ์ค ์ฃผ๋ฌธ ์ดํ ํ๋ฆ์ ์ํ ์ ์ด์ Orchestration์ผ๋ก ์ค๊ณํ๊ธฐ
- ์ฃผ๋ฌธ ์ดํ ๊ฒฐ์ , ์ ์ฐ, ์๋ฆผ, Outbox ํ๋ฆ์ ์ํ ์ ์ด์ Orchestration ๊ด์ ์์ ์ ๋ฆฌํ ๋ํ ์ค๊ณ ๊ธ์ ๋๋ค.
- Velog: Outbox ์ฌ์ฒ๋ฆฌ ๊ตฌ์กฐ์์ ์ค๋ณต ์ฒ๋ฆฌ์ ๋ฉฑ๋ฑ์ฑ์ ์ค๊ณํ๊ธฐ
- Outbox์ Retry ๊ตฌ์กฐ์์ ๋ฐ์ํ ์ ์๋ ์ค๋ณต ์์ฒญ, ๋์ ์ฌ์ฒ๋ฆฌ, ์ค๋ณต publish ๊ฐ๋ฅ์ฑ์
paymentRequestId์PROCESSINGclaim์ผ๋ก ์ ์ดํ ๊ณผ์ ์ ์ ๋ฆฌํ ์ฌํ ๊ธ์ ๋๋ค.
- Outbox์ Retry ๊ตฌ์กฐ์์ ๋ฐ์ํ ์ ์๋ ์ค๋ณต ์์ฒญ, ๋์ ์ฌ์ฒ๋ฆฌ, ์ค๋ณต publish ๊ฐ๋ฅ์ฑ์
- Portfolio Index: Backend Portfolio / Notes Index

