Employee Outbox Storage
Summary
EmployeeDbContext translates supported queued domain events into shared outbox records before EF Core saves changes. Business state, audit/timeline changes, and newly created outbox records participate in the same context commit.
Audience
- Backend developers and QA engineers
- DevOps engineers and solution architects
Transaction boundary
Persisted concepts
The outbox object stores message and event identity, event type, serialized content, occurrence time, processing status, retry count, optional processing/error/correlation/tenant context, and source service. Exact payload bodies are intentionally excluded.
| Index/constraint | Purpose | Source |
|---|---|---|
| Unique event-identity index | Prevent duplicate persisted event identifiers | Infrastructure/EmployeeDbContext.cs |
| Status plus occurrence-time index | Support ordered pending/failed retrieval | same |
The outbox store selects Pending or Failed records ordered by occurrence time, and supports marking a record Processed or Failed. The outbox object is not covered by the end-user tenant query filters because its repository is an operational relay store.
Delivery boundary
The unit of work proves atomic persistence of supported outbox records with the local Employee changes committed in that save. It does not prove that a relay is running, a broker accepted the message, or a downstream read model applied it. Runtime relay ownership and delivery guarantees remain Requires confirmation.
Source References
microservices/src/employee-service/Infrastructure/EmployeeDbContext.csmicroservices/src/employee-service/Infrastructure/Persistence.csmicroservices/src/employee-service/Infrastructure/Migrations/20260701173627_InitialEmployeeSchema.csmicroservices/src/shared-kernel/Outbox/OutboxMessage.csmicroservices/src/shared-kernel/Messaging/
Related Articles
See Also
- Future Employee Events and Integration Contracts documentation (Not implemented)
- Audit and timeline storage
Keywords
- Transactional outbox
- Relay boundary
- Event persistence
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly