Employee Event Overview
Summary
The Employee event model separates in-process aggregate facts from shared cross-service contracts and uses an outbox boundary between persistence and broker publication.
Audience
- Developers, architects, QA engineers, and service operators
Overview
The aggregate raises domain events after confirmed state transitions. During SaveChangesAsync, infrastructure maps supported domain events into shared integration-event records and adds serialized messages to the same EF Core unit of work. A shared event bus can publish staged messages. Employee Service does not register a background relay, so continuous forwarding from its outbox is not confirmed.
Architecture
| Layer | Confirmed responsibility | Maturity |
|---|---|---|
| Domain | Raise facts from aggregate methods | Foundation |
| Infrastructure mapping | Translate all seven Employee domain-event types | Foundation |
| Contract assembly | Define versioned shared records | Foundation |
| Outbox | Persist pending messages with aggregate changes | Foundation |
| Relay | Shared processor exists; Employee invocation absent | Requires confirmation |
| Consumers | Six services reference at least one Employee event | Transitional |
Contract boundary
Domain events are internal implementation facts. Integration events are shared serialized records. A matching name does not make the two types interchangeable; infrastructure explicitly creates a new integration-event identifier and supplies contract metadata.
Confirmed limitations
- No Employee Service hosted relay or scheduled call to
IOutboxProcessor.ProcessPendingAsyncwas found. - No consumer was found for
EmployeeDeleted,ManagerChanged,DepartmentChanged, orEmployeeTimelineEventRecorded. - Delivery guarantees beyond the implemented durable-message, acknowledgement, and requeue behavior Require confirmation.
- No approved deprecation or compatibility policy was found for Employee event contracts.
Source References
microservices/src/employee-service/Domain/Employees/Employee.csmicroservices/src/employee-service/Infrastructure/EmployeeDbContext.csmicroservices/src/employee-service/Program.csmicroservices/src/shared-kernel/Extensions/MessagingExtensions.csmicroservices/src/shared-kernel/Messaging/OutboxProcessor.cs
Related Articles
See Also
Keywords
- Event architecture
- Domain-to-integration boundary
- Delivery maturity
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly