Leave Events
Summary
Leave Service raises six domain-event types and maps them one-to-one to six shared integration contracts. It also consumes three Employee integration event types for its local profile projection.
Audience
Backend developers, QA, architects, integration partners, downstream service owners, and support engineers.
Overview
LeaveRequest, LeaveBalance, and the Encashment Foundation aggregate are event sources. SaveChanges converts queued domain events to integration contracts and stores them in the transactional outbox. A background relay publishes eligible messages; downstream projections and notifications update eventually and independently.
Confirmed outbound consumers are Payroll for approval/rejection/cancellation and Notification for approval/rejection. Leave consumes Employee created, updated, and employment-status events. Workflow integration is HTTP/callback based, not a dedicated event contract. Other candidate services have no confirmed Leave subscription.
Delivery is Transitional: the outbox retries publication, but consumer completion is outside the Leave transaction; multi-save decision/balance flows can publish separate events; and no global ordering guarantee or formal contract registry was found.
Documentation map
- Overview, domain events, integration events, publishing, and delivery
- Consumer landscape, request events, decision events, balance events, and encashment events
- Employee projection, Workflow, Payroll, and Notification
- Versioning, idempotency/ordering, retry/failure, catalog, and testing
Related scopes: Business, Technical, API, and Database. HTTP contracts, database columns, broker topology, and payload examples are intentionally not duplicated.
Source References
- microservices/src/leave-service/Domain/Leave/LeaveDomainEvents.cs
- microservices/src/contracts/Events/LeaveLifecycleEvents.cs
- microservices/src/leave-service/Infrastructure/LeaveDbContext.cs
Related Articles
See Also
Keywords
- Leave events
- Integration contracts
- Eventual consistency
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly