Leave Employee Profile Events
Summary
Leave subscribes exactly to EmployeeCreated, EmployeeUpdated, and EmploymentStatusChanged to maintain EmployeeProfile.
Audience
Employee/Leave developers, QA, architects, integration owners, and support.
Concept
Employee Service owns and maps the three shared contracts at version 1. Leave parses a compatibility envelope, validates numeric tenant/legacy identity, upserts the local read model, derives active state from employment status, records last event identity/time, and audits synchronized/skipped/duplicate/stale outcomes.
Duplicate protection only compares the last event identity; staleness compares occurrence time. This is not a general inbox ledger. Failures are negatively acknowledged and requeued. No EmployeeDeleted subscription or deletion propagation exists. Reconciliation/backfill ownership and non-consecutive replay behavior require confirmation.
Source References
- microservices/src/leave-service/Messaging/EmployeeProfileConsumer.cs
- microservices/src/employee-service/Infrastructure/EmployeeDbContext.cs
- microservices/src/contracts/Events/EmployeeCreatedEvent.cs
- microservices/src/contracts/Events/EmployeeUpdatedEvent.cs
- microservices/src/contracts/Events/EmploymentStatusChangedEvent.cs
- microservices/src/leave-service/Domain/Leave/EmployeeProfile.cs
Related Articles
See Also
Keywords
- Employee projection
- Duplicate event
- Stale event
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly