ARCHOS 525 BLUEPRINT · /d/dgm_distributed-message-queue
Distributed Message Queue (partitioned replicated log)
12 COMPONENTS · 12 FLOWS · UPDATED 2026-11-20
GITHUB README / PR PREVIEW CARD
[](https://archos.sageideas.dev/d/dgm_distributed-message-queue) *Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_distributed-message-queue)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_distributed-message-queue" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Distributed Message Queue (partitioned replicated log) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
client_0[("Producer Application")]
sink_1[("Downstream Service")]
leader_2[("Partition")]
fb_3[("Partition")]
ctl_4[("Consensus")]
cons_5["Competing consumers"]
off_6[("Offset")]
dlq_7[("Dead-letter queue (DLQ)")]
tsdb_8[("Time-series database (TSDB)")]
alerting_9[("Alerting")]
secrets_10[("Secrets manager")]
capacity_11["Capacity Estimate"]
client_0 -->|"1. Sends batch, trace id · TCP"| leader_2
leader_2 -->|"2a. Serves fetch · TCP"| fb_3
leader_2 -.->|"2b. Serves batch · TCP"| cons_5
cons_5 -->|"3a. Sends result with key · HTTPS"| sink_1
cons_5 -.->|"3b. Parks poison messages · TCP"| dlq_7
cons_5 -->|"3c. Commits offset · TCP"| off_6
leader_2 -->|"Reports in-sync set · TCP"| ctl_4
ctl_4 -->|"Promotes a follower · TCP"| fb_3
tsdb_8 -->|"Scrapes log end offset · HTTPS"| leader_2
tsdb_8 -->|"Scrapes committed offset · HTTPS"| off_6
tsdb_8 -->|"Supplies metrics · HTTPS"| alerting_9
secrets_10 -->|"Supplies keys · HTTPS"| leader_2COMPONENT STACK (11)
- Producer ApplicationSTATEFULSends batches with a trace id header
- Downstream ServiceSTATEFULReceives each processed result
- PartitionSTATEFULLeader: checks ACLs, takes writes
- PartitionSTATEFULFollowers pull the log from the leader
- ConsensusSTATEFULController quorum: tracks in-sync set
- Competing consumersSTATELESSConsumer group: one consumer per partition
- OffsetSTATEFULCommitted position, kept in an internal topic
- Dead-letter queue (DLQ)STATEFULParks messages no consumer can process
- Time-series database (TSDB)STATEFULStores consumer lag and request latency
- AlertingSTATEFULPages on-call when consumer lag keeps rising
- Secrets managerSTATEFULHolds broker certificates and ACL credentials
REQUEST & DATA FLOW (12)
- Producer Application → Partition (Sends batch, trace id)[TCP]
- Partition → Partition (Serves fetch)[TCP]
- Partition → Competing consumers (Serves batch)[TCP]
- Competing consumers → Downstream Service (Sends result with key)[HTTPS]
- Competing consumers → Dead-letter queue (DLQ) (Parks poison messages)[TCP]
- Competing consumers → Offset (Commits offset)[TCP]
- Partition → Consensus (Reports in-sync set)[TCP]
- Consensus → Partition (Promotes a follower)[TCP]
- Time-series database (TSDB) → Partition (Scrapes log end offset)[HTTPS]
- Time-series database (TSDB) → Offset (Scrapes committed offset)[HTTPS]
- Time-series database (TSDB) → Alerting (Supplies metrics)[HTTPS]
- Secrets manager → Partition (Supplies keys)[HTTPS]