Skip to main content

Workflow Transactional Outbox

Summary

WorkflowDbContext maps queued aggregate events to outbox messages immediately before the same save that persists aggregate/audit/timeline changes.

Outbox lifecycle

Store behavior

The Workflow outbox store selects Pending or Failed records oldest-first in a bounded batch. Processed and failed status changes use separate saves.

Relay ownership

One Workflow hosted background service resolves the shared processor each iteration and polls on a fixed interval. It requests a bounded batch.

Persistence boundary

Event identifier is unique. Payload is serialized JSON. Outbox records have no Workflow numeric-tenant query filter.

Requires Confirmation

Cleanup, tenant-safe inspection, concurrent relay claiming, maximum retries and dead-letter behavior require confirmation.

Source References

  • microservices/src/workflow-service/Infrastructure/WorkflowDbContext.cs
  • microservices/src/workflow-service/Infrastructure/Persistence.cs
  • microservices/src/workflow-service/Messaging/OutboxRelayHostedService.cs
  • microservices/src/shared-kernel/Messaging/OutboxProcessor.cs

See Also

Keywords

Workflow events, integration contracts, transactional outbox.

Revision Information

  • Status: Draft
  • Last reviewed: 2026-07-20
  • Next review: 2026-10-20