Employee Event Outbox and Delivery
Summary
Employee Service implements transactional outbox staging and a store compatible with the shared processor. It does not confirm an Employee-owned runtime loop that invokes that processor.
Audience
- Developers, architects, QA engineers, DevOps engineers, and support engineers
Overview
The outbox is written through the same EmployeeDbContext save as aggregate state. The store selects pending or failed messages in occurrence order, and the shared processor publishes a batch one item at a time.
Transaction boundary
Confirmed state handling
- New messages begin as pending.
- The Employee store selects pending and failed messages, ordered by occurrence time and limited by batch size.
- A successful event-bus result marks the message processed and clears its stored error.
- An unavailable bus or exception increments the retry count and marks the message failed.
- Failed Employee messages remain selectable; no Employee-specific attempt ceiling or terminal state was found.
- The shared status vocabulary includes a processing value, but the inspected processor/store path does not set it.
Delivery semantics
Persistent publication metadata and consumer acknowledgements are present in source. That does not by itself prove exactly-once delivery. The source supports an at-least-once-oriented design when the relay is invoked, so consumers should be duplicate tolerant. End-to-end service-level objectives, relay scheduling, monitoring ownership, and replay approval Require confirmation.
Operational boundary
This page intentionally omits broker topology names, connection settings, hosts, credentials, and direct production repair procedures. The Employee Service's missing invocation is documented as an implementation gap, not as a vulnerability.
Source References
microservices/src/employee-service/Infrastructure/EmployeeDbContext.csmicroservices/src/employee-service/Infrastructure/Persistence.csmicroservices/src/employee-service/Program.csmicroservices/src/shared-kernel/Outbox/OutboxMessage.csmicroservices/src/shared-kernel/Outbox/OutboxMessageStatus.csmicroservices/src/shared-kernel/Messaging/OutboxProcessor.csmicroservices/src/shared-kernel/Messaging/RabbitMqEventBus.csmicroservices/src/shared-kernel/Extensions/MessagingExtensions.cs
Related Articles
See Also
Keywords
- Outbox relay
- Delivery state
- At-least-once design
Revision Information
- Status: Draft
- Last reviewed: 2026-07-15
- Review cycle: Quarterly