Backend, Data & Security More detail C · Industry convention Platform: Web

Transactional Outbox

A transactional outbox saves a data change and a message record in one local database transaction. A relay sends the saved message after the transaction commits.

See how it works
You might call it outbox patterntransactional outbox patterndatabase outbox

See how it works

Original worked exampleTransactional Outbox
State & recoveryTransactional Outboxlocal transaction(business row + outbox row) -> relay/CDC -> broker -> idempotent consumer
ONE DATABASE COMMITCOMMIT ✓
orders✓order_2048
outbox✓evt_784
✓ Order and event intent saved togethertx_42
KEEP SAFEThe business row and outbox row commit in one local database transaction.RECOVERThe relay retries publishing; consumers handle duplicate event IDs.
local transaction(business row + outbox row) -> relay/CDC -> broker -> idempotent consumerJOB
Transactional OutboxBackend reliability

Another example

Checkout saves order `984` and outbox event `OrderCreated:984` in one transaction. A relay publishes the event later. If it stops after sending but before marking the row, it may send again. The consumer removes the duplicate by event ID.

Main parts

  1. 01Business data change
  2. 02Outbox event row
  3. 03One local transaction
  4. 04Relay or change stream
  5. 05Broker publication
  6. 06Duplicate-safe consumer

Use it when

Use it when a committed database change must reliably lead to a message or event. Keep the outbox in the same transaction and operate the relay as its own reliable process.

Do not use it when

Do not call it one-time delivery or one transaction across services. Plan for repeated events, their order, relay delay, cleanup, and safe duplicate handling.

Name used in code

local transaction(business row + outbox row) -> relay/CDC -> broker -> idempotent consumer

Before you ship

Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback.

Request you can copy

Outcome: Design or review Transactional Outbox for this system while keeping data correct, secure, and easy to operate. User context: Checkout saves order `984` and outbox event `OrderCreated:984` in one transaction. A relay publishes the event later. If it stops after sending but before marking the row, it may send again. The consumer removes the duplicate by event ID. Technical concept or control: Transactional Outbox. Why it fits: Use it when a committed database change must reliably lead to a message or event. Keep the outbox in the same transaction and operate the relay as its own reliable process. Do not use it when: Do not call it one-time delivery or one transaction across services. Plan for repeated events, their order, relay delay, cleanup, and safe duplicate handling. Engineering requirements: Define inputs, outputs, contracts, and rules that must always hold. Set authorization and input checks. Define failures, timeouts, retries, one-time effects, data moves, and compatibility limits. Operations: Add useful signals and logs that hide sensitive data. Set capacity limits and write an operator guide. Test recovery and rollback. Acceptance criteria: Contract and failure-path tests pass. Data and authorization rules still hold during retries and partial failures. Check performance limits, monitoring, recovery, and rollback. Evidence and limits (evidence boundary): No single official standard controls the whole term. Its meaning may change across teams, platforms, or frameworks. Unknowns to confirm: Where the code runs, data stores, traffic shape, consistency needs, and the security boundary. Also confirm the compatibility period, service goals, and rollback limits.

Check this request

Review the current use of Transactional Outbox. Definition: A transactional outbox saves a data change and a message record in one local database transaction. A relay sends the saved message after the transaction commits. Release checks: Check contracts and invariants, authorization, and input limits. Test retries, one-time effects, timeouts, and partial failures. Verify data integrity, compatibility, monitoring, recovery, and rollback. Before changing code, report the evidence you found, gaps, severity, and the smallest safe fix.

C
How official is this term?

Industry convention

People often use this term at work. The listed sources may support practice or limitations. They do not define every part of the term.

No single official standard controls the whole term. Its meaning may change across teams, platforms, or frameworks.

Scope
Cross-platform transactional-outbox engineering convention; AWS only supports the cited Prescriptive Guidance pattern
Document status
stable
Checked on
2026-07-30

Evidence sources & scope

Authority source + Term reference · Amazon Web Services · stable Transactional outbox pattern Scope: AWS Prescriptive Guidance for the transactional-outbox pattern used only as context for a cross-platform engineering convention; not a formal distributed-transaction standard Role here: Direct term reference Source covers: canonical name, definition, implementation, usage guidance, avoidance guidance

Copy it yourself

The browser could not copy this. Select the request below and copy it yourself.