Skip to main content
ARCHOS 525 BLUEPRINT · /d/dgm_async-decoupling

Order Processing (async decoupling with queues and events)

13 COMPONENTS · 13 FLOWS · UPDATED 2026-11-20
GITHUB README / PR PREVIEW CARD
[![Order Processing (async decoupling with queues and events) — ArchOS Architecture](https://archos.sageideas.dev/d/dgm_async-decoupling/opengraph-image)](https://archos.sageideas.dev/d/dgm_async-decoupling)

*Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_async-decoupling)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_async-decoupling" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Order Processing (async decoupling with queues and events) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
  client_0[("API Client")]
  sink_mail_1[("Email Provider")]
  prod_2["Event producer"]
  sor_3[("System of record")]
  relay_4[("Message relay")]
  topic_5[("Publish-subscribe")]
  q_mail_6[("Message queue")]
  q_index_7[("Message queue")]
  dlq_8[("Dead-letter queue (DLQ)")]
  w_mail_9["Competing consumers"]
  w_index_10["Competing consumers"]
  search_11[("Search index")]
  capacity_12["Capacity Estimate"]
  client_0 -->|"1. Submits order · HTTPS"| prod_2
  prod_2 -->|"2a. Saves order, outbox (SQL) · SQL"| sor_3
  prod_2 -->|"2b. Replies 202 · HTTPS"| client_0
  sor_3 -->|"3. Reads outbox (SQL) · SQL"| relay_4
  relay_4 -.->|"4. Publishes event · Publish-subscribe"| topic_5
  topic_5 -.->|"5a. Fans out · Publish-subscribe"| q_mail_6
  topic_5 -.->|"5b. Fans out · Publish-subscribe"| q_index_7
  q_mail_6 -.->|"6a. Pulls work · Message queue"| w_mail_9
  q_index_7 -.->|"6b. Pulls work · Message queue"| w_index_10
  q_mail_6 -.->|"6c. Parks poison messages · Message queue"| dlq_8
  q_index_7 -.->|"6d. Parks poison messages · Message queue"| dlq_8
  w_mail_9 -->|"7a. Sends email (HTTPS) · HTTPS"| sink_mail_1
  w_index_10 -->|"7b. Updates index · HTTPS"| search_11

COMPONENT STACK (12)

  • API ClientSTATEFUL
    Places an order from a browser or app
  • Email ProviderSTATEFUL
    Third-party service that sends the email
  • Event producerSTATELESS
    Order service: saves the order, replies 202
  • System of recordSTATEFUL
    Order store: holds each order and its outbox row
  • Message relaySTATEFUL
    Reads new outbox rows and publishes them
  • Publish-subscribeSTATEFUL
    Order events topic: each subscriber gets a copy
  • Message queueSTATEFUL
    Email queue: holds email jobs
  • Message queueSTATEFUL
    Index queue: holds search-index jobs
  • Dead-letter queue (DLQ)STATEFUL
    Parks failing messages from both queues
  • Competing consumersSTATELESS
    Email workers; dedupe not drawn
  • Competing consumersSTATELESS
    Index workers: add more when depth grows
  • Search indexSTATEFUL
    Derived copy of orders for fast search

REQUEST & DATA FLOW (13)

  1. API Client → Event producer (Submits order)[HTTPS]
  2. Event producer → System of record (Saves order, outbox (SQL))[SQL]
  3. Event producer → API Client (Replies 202)[HTTPS]
  4. System of record → Message relay (Reads outbox (SQL))[SQL]
  5. Message relay → Publish-subscribe (Publishes event)[Publish-subscribe]
  6. Publish-subscribe → Message queue (Fans out)[Publish-subscribe]
  7. Publish-subscribe → Message queue (Fans out)[Publish-subscribe]
  8. Message queue → Competing consumers (Pulls work)[Message queue]
  9. Message queue → Competing consumers (Pulls work)[Message queue]
  10. Message queue → Dead-letter queue (DLQ) (Parks poison messages)[Message queue]
  11. Message queue → Dead-letter queue (DLQ) (Parks poison messages)[Message queue]
  12. Competing consumers → Email Provider (Sends email (HTTPS))[HTTPS]
  13. Competing consumers → Search index (Updates index)[HTTPS]
Configure NGINX / Postgres / K8s →60-Sec L4–L7 Diagnostic →