Implements 100% exactly-once semantics for CDC events from 1.0 databases (identity-service, planting-service, referral-service) to contribution-service. Key changes: - Add ProcessedCdcEvent model with (sourceTopic, offset) unique constraint - Add withIdempotency() wrapper using Serializable transaction isolation - Add registerTransactionalHandler() for handlers requiring idempotency - Modify CDC handlers to accept external transaction client - All database operations now use the passed transaction client This ensures that: 1. Each CDC event is processed exactly once 2. Idempotency record and business logic are in the same transaction 3. Any failure causes complete rollback Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| prisma | ||
| src | ||
| .env.example | ||
| DEVELOPMENT_GUIDE.md | ||
| Dockerfile | ||
| nest-cli.json | ||
| package-lock.json | ||
| package.json | ||
| tsconfig.json | ||