Skip to main content

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.cs
  • microservices/src/employee-service/Infrastructure/Persistence.cs
  • microservices/src/employee-service/Program.cs
  • microservices/src/shared-kernel/Outbox/OutboxMessage.cs
  • microservices/src/shared-kernel/Outbox/OutboxMessageStatus.cs
  • microservices/src/shared-kernel/Messaging/OutboxProcessor.cs
  • microservices/src/shared-kernel/Messaging/RabbitMqEventBus.cs
  • microservices/src/shared-kernel/Extensions/MessagingExtensions.cs

See Also​

Keywords​

  • Outbox relay
  • Delivery state
  • At-least-once design

Revision Information​

  • Status: Draft
  • Last reviewed: 2026-07-15
  • Review cycle: Quarterly