Event Idempotency
Summary
Idempotency varies by context: Payroll and Notification have unique processed-event ledgers; Leave stores only the last applied identity; Recruitment has an unused foundation ledger.
Audience
Consumer developers, QA, support, architects, and reliability reviewers.
Reference Content
| Component | Duplicate mechanism | Boundary |
|---|---|---|
| Recruitment producer | Unique outbox event identity; command state guards | Producer/local only |
| Employee producer | Unique outbox event identity; aggregate state checks | Producer/local only |
| Payroll consumer | ProcessedIntegrationEvent uniqueness | General consumed-event ledger |
| Leave consumer | LastProfileEventId on projection | Consecutive/last-event protection |
| Notification consumer | Unique ProcessedIntegrationEvent | General consumed-event ledger |
| Recruitment consumer side | Processed ledger model only | No consumer wired |
| Compatibility lifecycle | No lifecycle event idempotency | Not event-driven |
Producer mapping creates a new integration identity rather than reusing the domain-event identity. Re-running a command can therefore create another contract unless command/domain state prevents the transition.
Leave's last-event approach may not detect a non-consecutive replay after a newer event. Cross-service end-to-end idempotency and business-key deduplication require confirmation.
Requires confirmation
Unless explicitly confirmed above, live delivery, consumer deployment, replay, reconciliation, retention, contract governance, monitoring and production ownership require confirmation.
Source References
microservices/src/payroll-service/Messaging/PayrollReadModelConsumer.csmicroservices/src/leave-service/Messaging/EmployeeProfileConsumer.csmicroservices/src/notification-service/Application/NotificationDispatcher.csmicroservices/src/recruitment-service/Infrastructure/RecruitmentDbContext.cs
Related Articles
See Also
Keywords
- Onboarding events
- Offboarding events
- Integration contracts
Revision Information
- Status: Draft
- Last reviewed: 2026-07-20
- Review cycle: Quarterly