Outbox Table Standard¶
Purpose¶
The Outbox Table Standard defines future-safe persistence rules for reliable event publication.
Responsibility¶
Outbox records are written transactionally with source-domain changes when an event must be reliably published to internal consumers, integrations, analytics, notifications, AIOS, or future external messaging.
Standard Fields¶
| Field | Purpose |
|---|---|
| Outbox ID | Stable outbox record identity. |
| Event ID | Stable event identity. |
| Event type | Past-tense event name. |
| Event version | Event contract version. |
| Source module | Publishing module. |
| Aggregate type | Source aggregate type. |
| Aggregate ID | Source aggregate identifier. |
| Tenant ID | Tenant context where applicable. |
| Organization ID | Organization context where applicable. |
| Correlation ID | Workflow traceability. |
| Causation ID | Prior request or event. |
| Payload | Event payload or reference. |
| Status | Pending, published, failed, dead-lettered, or skipped. |
| Retry count | Delivery retry tracking. |
| Created at | Record creation timestamp. |
Flow¶
sequenceDiagram
participant App as Application Service
participant DB as PostgreSQL Transaction
participant Outbox
participant Publisher
participant Consumer
App->>DB: Change source fact
App->>Outbox: Insert outbox event
DB-->>App: Commit
Publisher->>Outbox: Poll pending
Publisher->>Consumer: Publish event
Publisher->>Outbox: Mark published
Rules¶
- Source module publishes its own events.
- Events are facts that already happened.
- Outbox records must be idempotent for publisher retries.
- Consumer idempotency remains required.
- Outbox retention and archival are governed.
- Outbox payloads must not contain secrets or unnecessary sensitive data.