rwadurian/backend/services/authorization-service/src
hailin 014ad9d19f feat(planting): implement Outbox Pattern with consumer acknowledgment (B方案)
Implement reliable event delivery using Outbox Pattern with consumer confirmation:

## planting-service (Producer)
- Add OutboxEvent table with status: PENDING → SENT → CONFIRMED
- Add OutboxRepository with transaction support and timeout handling
- Add OutboxPublisherService with polling, timeout check, and retry
- Add EventAckController to receive consumer confirmations
- Update UnitOfWork to save outbox events atomically with business data
- Update PlantingApplicationService to use outbox pattern
- Update PoolInjectionService to use outbox pattern

## Consumer Services
- Add EventAckPublisher to reward-service, referral-service, authorization-service
- Update event handlers to send acknowledgment after successful processing

## Event Flow
1. Business data + outbox events saved in same transaction
2. OutboxPublisher polls and sends to Kafka, marks as SENT
3. Consumer processes event and sends ack to planting.events.ack
4. EventAckController receives ack and marks as CONFIRMED
5. Timeout check resets SENT→PENDING for retry (max 5 times)

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 21:32:16 -08:00
..
api refactor(mpc-system): migrate to party-driven architecture with PartyID-based routing 2025-12-05 08:11:28 -08:00
application feat(withdrawal): implement withdrawal order and fund allocation system 2025-12-09 02:35:27 -08:00
config refactor(mpc-system): migrate to party-driven architecture with PartyID-based routing 2025-12-05 08:11:28 -08:00
domain feat(withdrawal): implement withdrawal order and fund allocation system 2025-12-09 02:35:27 -08:00
infrastructure feat(planting): implement Outbox Pattern with consumer acknowledgment (B方案) 2025-12-09 21:32:16 -08:00
shared feat(profile): integrate referral and authorization APIs for profile page 2025-12-09 01:57:39 -08:00
app.module.ts refactor(mpc-system): migrate to party-driven architecture with PartyID-based routing 2025-12-05 08:11:28 -08:00
main.ts refactor(mpc-system): migrate to party-driven architecture with PartyID-based routing 2025-12-05 08:11:28 -08:00