Skip to main content

Payroll Outbox Storage

Summary​

Transactional outbound-event intent and relay boundary.

Audience​

Payroll developers, QA and support engineers, solution and security architects, and implementation partners.

Reference Content​

The sections below describe the confirmed logical storage contract and its implementation boundaries.

Purpose​

Describe the shared-kernel outbox record as used by Payroll.

Ownership​

PayrollDbContext maps the shared OutboxMessage type into Payroll-owned persistence.

Lifecycle​

Selected native operations add an outbox message before SaveChanges. The record tracks event identity/type, tenant metadata, payload, status, occurrence/processing attempts, error summary, correlation, and source service.

Persisted fields​

High-level groups are message/event identity, tenant and event classification, structured payload, delivery status, timing/attempt metadata, bounded failure summary, correlation, and source.

Relationships​

Outbox payloads may refer to Payroll records, but no foreign key is configured.

Constraints​

Event identity is unique. Required/bounded metadata and structured payload mapping are configured.

Indexes​

A unique event-identity index supports deduplication. A status/occurrence-time index supports pending-message scanning.

Tenant behavior​

Outbox records carry tenant metadata but do not have PayrollDbContext's global tenant filter. Relay/read code must apply its own intended scope.

Audit behavior​

Outbox status is delivery state, not a substitute for PayrollAuditLog.

Integration usage​

The local business change and outbox intent share a SaveChanges boundary where staged together. Broker publication is necessarily later and outside that transaction.

Known limitations​

The shared outbox processor is registered in source, but automatic hosted relay execution in the Payroll host is not confirmed.

Requires confirmation​

  • Deployed relay ownership, retry/dead-letter policy, and monitoring.
  • Tenant-scoping expectations for relay queries.

Source References​

  • microservices/src/payroll-service/Infrastructure/PayrollDbContext.cs
  • microservices/src/payroll-service/Domain/PayrollEntities.cs
  • microservices/src/payroll-service/Infrastructure/Migrations/PayrollDbContextModelSnapshot.cs
  • microservices/src/payroll-service/Infrastructure/Persistence.cs
  • microservices/src/payroll-service/Application/PayrollCalculationService.cs
  • microservices/src/payroll-service/Application/PayrollOutputsService.cs

See Also​

Keywords​

  • Payroll database
  • Payroll Outbox Storage
  • Payroll persistence

Revision Information​

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