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
[](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_5COMPONENT STACK (6)
- Aggregate MutationSTATELESSOrderPlaced / InvoicePaid
- Aggregate Event ListSTATEFULAppends pure immutable events
- TX Commit BarrierSTATELESSFires listeners ONLY after COMMIT
- Outbox PersistenceSTATEFULDurable bridge to Kafka/email
- Decoupled SubscribersSTATELESSMetrics, notifications & projections
- Downstream & OTelSTATELESSConsumers, metrics & SLOs
REQUEST & DATA FLOW (6)
- Aggregate Mutation → Aggregate Event List (Raise)[In-Proc]
- Aggregate Event List → TX Commit Barrier (After TX)[Barrier]
- Aggregate Event List → Outbox Persistence (Stage row)[SQL]
- TX Commit Barrier → Decoupled Subscribers (Handle)[Async]
- Outbox Persistence → Decoupled Subscribers (Merge)[RAM]
- Decoupled Subscribers → Downstream & OTel (Emit /)[OTLP/API]