Root cause: calculateForAdoption uses separate DB connections, which cannot see uncommitted data in Serializable isolation level, causing "Adoption not found" errors. Solution (following Kafka Idempotent Consumer best practice): - Add TransactionalCDCHandlerWithResult<T> type for handlers with return - Add withIdempotencyAndCallback() wrapper for post-commit callbacks - Add registerTransactionalHandlerWithCallback() registration method - AdoptionSyncedHandler.handle() now returns AdoptionSyncResult - Contribution calculation runs AFTER transaction commits via callback Reference: Lydtech Consulting - Kafka Idempotent Consumer Pattern https://www.lydtechconsulting.com/blog/kafka-idempotent-consumer-transactional-outbox 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 | ||