Skip to main content

Leave Messaging and Outbox

Summary​

Aggregate domain events are translated to integration events and persisted transactionally before background publication.

Audience​

Backend developers, architects, QA, DevOps, and integration engineers.

Overview​

Request, balance, and encashment domain events have conceptual integration mappings. Full payloads are deferred to the Events epic. The relay processes pending/failed messages through Shared Kernel messaging; success/failure status is persisted for retry.

The Employee consumer separately subscribes to confirmed profile events, uses explicit acknowledgements, requeues failures, and implements duplicate/stale handling. Request correlation middleware exists, and external clients forward correlation context; end-to-end broker correlation coverage requires confirmation. Consumers remain responsible for idempotency and reconciliation.

Source References​

  • microservices/src/leave-service/Domain/Leave/LeaveDomainEvents.cs
  • microservices/src/leave-service/Infrastructure/LeaveDbContext.cs
  • microservices/src/leave-service/Messaging/OutboxRelayHostedService.cs
  • microservices/src/leave-service/Messaging/EmployeeProfileConsumer.cs
  • microservices/src/shared-kernel/Messaging/OutboxProcessor.cs

See Also​

Keywords​

  • Leave Service
  • Leave Messaging and Outbox
  • Technical architecture

Revision Information​

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