Skip to main content
ARCHOS 525 BLUEPRINT · /d/dgm_code-domain-events-in-process

In-Process Domain Events (Decoupled Side Effects & Post-Commit Dispatch)

6 COMPONENTS · 6 FLOWS · UPDATED 2026-11-24
GITHUB README / PR PREVIEW CARD
[![In-Process Domain Events (Decoupled Side Effects & Post-Commit Dispatch) — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_code-domain-events-in-process/opengraph-image)](https://archos.sageideas.dev/d/dgm_code-domain-events-in-process)

*Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_code-domain-events-in-process)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_code-domain-events-in-process" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="In-Process Domain Events (Decoupled Side Effects & Post-Commit Dispatch) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
  client_0["Aggregate Mutation"]
  n1_1[("Aggregate Event List")]
  n2a_2["TX Commit Barrier"]
  n2b_3[("Outbox Persistence")]
  n3_4["Decoupled Subscribers"]
  downstream_5["Downstream & OTel"]
  client_0 -->|"1. Raise · In-Proc"| n1_1
  n1_1 -->|"2a. After TX · Barrier"| n2a_2
  n1_1 -->|"2b. Stage row · SQL"| n2b_3
  n2a_2 -->|"3a. Handle · Async"| n3_4
  n2b_3 -->|"3b. Merge · RAM"| n3_4
  n3_4 -.->|"4. Emit / · OTLP/API"| downstream_5

COMPONENT STACK (6)

  • Aggregate MutationSTATELESS
    OrderPlaced / InvoicePaid
  • Aggregate Event ListSTATEFUL
    Appends pure immutable events
  • TX Commit BarrierSTATELESS
    Fires listeners ONLY after COMMIT
  • Outbox PersistenceSTATEFUL
    Durable bridge to Kafka/email
  • Decoupled SubscribersSTATELESS
    Metrics, notifications & projections
  • Downstream & OTelSTATELESS
    Consumers, metrics & SLOs

REQUEST & DATA FLOW (6)

  1. Aggregate Mutation → Aggregate Event List (Raise)[In-Proc]
  2. Aggregate Event List → TX Commit Barrier (After TX)[Barrier]
  3. Aggregate Event List → Outbox Persistence (Stage row)[SQL]
  4. TX Commit Barrier → Decoupled Subscribers (Handle)[Async]
  5. Outbox Persistence → Decoupled Subscribers (Merge)[RAM]
  6. Decoupled Subscribers → Downstream & OTel (Emit /)[OTLP/API]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →