Skip to content

Feat/18/domain events 도메인 이벤트 로그 기록 구현 (EVT-001) #19

Merged
ohhalim merged 4 commits into
developfrom
feat/18/domain-events
May 14, 2026
Merged

Feat/18/domain events 도메인 이벤트 로그 기록 구현 (EVT-001) #19
ohhalim merged 4 commits into
developfrom
feat/18/domain-events

Conversation

@ohhalim
Copy link
Copy Markdown
Owner

@ohhalim ohhalim commented May 14, 2026

Summary

  • 도메인 이벤트 로그 기록 구현 (EVT-001)
  • 주문/체결/정산/취소 시점에 domain_events 테이블에 이벤트 저장
  • 향후 Kafka, outbox pattern, replay 확장을 위한 경계 확보

변경 내용

  • DomainEventType — 6개 이벤트 타입 enum
  • DomainEvent — 엔티티 (기존 V3 마이그레이션 테이블 활용)
  • DomainEventRepository — JpaRepository
  • DomainEventRecorder — ObjectMapper로 JSON 직렬화 후 저장
  • OrderService — 이벤트 기록 연결

기록 시점

이벤트 시점
ORDER_ACCEPTED 주문 저장 직후
ORDER_PARTIALLY_FILLED 부분 체결 직후
ORDER_FILLED 전량 체결 직후
ORDER_CANCELED 취소 처리 직후
TRADE_CREATED Trade 저장 직후
SETTLEMENT_COMPLETED 지갑 정산 완료 직후

Test plan

  • 도메인 이벤트 저장 통합 테스트 4개 통과
  • 전체 테스트 53개 통과 (회귀 없음)

관련 이슈

closes #18

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 14, 2026

Warning

Rate limit exceeded

@ohhalim has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 47 minutes and 27 seconds before requesting another review.

You’ve run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 18335605-8bd2-4f27-8f9d-7fed2ee2bf26

📥 Commits

Reviewing files that changed from the base of the PR and between 9563e93 and e0f3075.

📒 Files selected for processing (6)
  • src/main/java/com/coinflow/event/domain/DomainEvent.java
  • src/main/java/com/coinflow/event/domain/DomainEventType.java
  • src/main/java/com/coinflow/event/repository/DomainEventRepository.java
  • src/main/java/com/coinflow/event/service/DomainEventRecorder.java
  • src/main/java/com/coinflow/order/service/OrderService.java
  • src/test/java/com/coinflow/integration/DomainEventTest.java
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/18/domain-events

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ohhalim ohhalim merged commit bbc5835 into develop May 14, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feat]: 도메인 이벤트 로그 기록 (EVT-001)

1 participant