rwadurian/backend/services/blockchain-service
hailin 075c9aaa48 feat(blockchain): implement Outbox Pattern for reliable event delivery
Implement Outbox Pattern with consumer ACK to ensure 100% reliable event
delivery between blockchain-service and wallet-service:

blockchain-service:
- Add OutboxEvent model to Prisma schema with status tracking
- Create outbox repository interface and implementation
- Modify deposit-detection.service to write events to outbox
- Add outbox-publisher.service with cron jobs for publishing/retry
- Add deposit-ack-consumer.service to receive ACK from wallet-service
- Add publishRaw method to event-publisher.service

wallet-service:
- Modify deposit-confirmed.handler to send ACK after successful processing
- Add wallet.deposit.credited topic mapping for ACK events

Event flow:
1. Deposit detected → written to outbox (status: PENDING)
2. Outbox publisher sends to Kafka → status: SENT
3. wallet-service processes and sends ACK → status: ACKED
4. Events without ACK are retried with exponential backoff

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 21:47:31 -08:00
..
.claude fix(mobile-app): update share link domain to rwaapi.szaiai.com 2025-12-06 21:15:55 -08:00
contracts feat(blockchain-service): KAVA EVM address derivation and system accounts support 2025-12-08 21:45:34 -08:00
prisma feat(blockchain): implement Outbox Pattern for reliable event delivery 2025-12-09 21:47:31 -08:00
scripts feat(blockchain-service): KAVA EVM address derivation and system accounts support 2025-12-08 21:45:34 -08:00
src feat(blockchain): implement Outbox Pattern for reliable event delivery 2025-12-09 21:47:31 -08:00
.dockerignore feat(blockchain-service): implement complete blockchain service with DDD + Hexagonal architecture 2025-12-06 20:54:58 -08:00
.env.example docs(config): update .env.example files for production deployment 2025-12-07 04:55:21 -08:00
.eslintrc.js feat(blockchain-service): implement complete blockchain service with DDD + Hexagonal architecture 2025-12-06 20:54:58 -08:00
.gitignore feat(blockchain-service): implement complete blockchain service with DDD + Hexagonal architecture 2025-12-06 20:54:58 -08:00
.prettierrc feat(blockchain-service): implement complete blockchain service with DDD + Hexagonal architecture 2025-12-06 20:54:58 -08:00
DEVELOPMENT_GUIDE.md docs: update blockchain-service guide with address derivation responsibilities 2025-12-06 20:02:50 -08:00
Dockerfile fix(wallet): resolve account creation and wallet status query issues 2025-12-08 07:57:17 -08:00
deploy.sh . 2025-12-07 00:40:19 -08:00
docker-compose.yml refactor: unify docker-compose configs to use shared infrastructure 2025-12-07 00:35:56 -08:00
nest-cli.json feat(blockchain-service): implement complete blockchain service with DDD + Hexagonal architecture 2025-12-06 20:54:58 -08:00
package-lock.json feat(deposit): add deposit balance API and Kafka consumer for deposit events 2025-12-09 02:29:31 -08:00
package.json feat(deposit): add deposit balance API and Kafka consumer for deposit events 2025-12-09 02:29:31 -08:00
tsconfig.json feat(blockchain-service): implement complete blockchain service with DDD + Hexagonal architecture 2025-12-06 20:54:58 -08:00