Skip to main content

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

ComponentDuplicate mechanismBoundary
Recruitment producerUnique outbox event identity; command state guardsProducer/local only
Employee producerUnique outbox event identity; aggregate state checksProducer/local only
Payroll consumerProcessedIntegrationEvent uniquenessGeneral consumed-event ledger
Leave consumerLastProfileEventId on projectionConsecutive/last-event protection
Notification consumerUnique ProcessedIntegrationEventGeneral consumed-event ledger
Recruitment consumer sideProcessed ledger model onlyNo consumer wired
Compatibility lifecycleNo lifecycle event idempotencyNot 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.cs
  • microservices/src/leave-service/Messaging/EmployeeProfileConsumer.cs
  • microservices/src/notification-service/Application/NotificationDispatcher.cs
  • microservices/src/recruitment-service/Infrastructure/RecruitmentDbContext.cs

See Also

Keywords

  • Onboarding events
  • Offboarding events
  • Integration contracts

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-20
  • Review cycle: Quarterly