Engineering lens demos/eng-08-adr.html Fictional data ← all artifacts
Architecture decision record · order-gateway
ADR-014   ACCEPTED

Event streaming for order-status notifications

ABC Corp is a fictional company. Every name, number and date is invented. This is a reference artifact generated with an LLM coding agent; the brief that produces it is at the bottom of this page.

Team order-gateway Accepted 5 Jun 2026 Deciders R. Okafor, A. Kowalczyk, S. de Wit, P. Mehta Supersedes ADR-009: Shared read replica for consumer polling Programme Project Lighthouse

Context

Six downstream consumers (customer portal, mobile push, e-mail dispatch, CRM sync, warehouse ops, analytics) currently learn about order-status changes by polling the orders database through the read replica introduced in ADR-009. Polling now accounts for roughly 38% of read load on the replica, and because the consumers poll on a 15-minute cycle, customers see status updates up to 15 minutes late, the single biggest source of "where is my order" contact-centre tickets in the Lighthouse baseline study (≈ €210k/yr handling cost, fictional figure). Two more consumers are planned for Q4 2026. The polling pattern does not scale and couples every consumer to the orders schema; a schema migration in May required coordinated changes in five consumer teams.

Options considered

OPTION A · Self-managed Kafka

Run our own Kafka cluster on the existing container platform. Full control over configuration, retention, and placement; we operate brokers, upgrades, and on-call ourselves.

OPTION B · CHOSEN · Managed streaming service

Use the cloud provider's managed event-streaming service (Kafka-compatible API) in our EU region. Provider operates brokers; we own topics, schemas, and access control.

OPTION C · Extend existing message queue

Publish status changes onto the existing task queue (point-to-point) with a fan-out exchange per consumer. No new infrastructure, but the queue was not designed for replayable, ordered event streams.

Criteria comparison · 1–5 dots, higher is better · weighted totals

Criterion (weight)A · Self-managed KafkaB · Managed streamingC · Extend queue
Operational burden (×3) own brokers + on-call provider-operated existing platform
Latency (×3) sub-second sub-second no replay; backlog risk
Cost / yr (×2) ≈ €260k incl. ops effort ≈ €120k usage-based ≈ €70k + rework later
Residency control (×3) fully in-platform EU region pinning existing controls
Team familiarity (×2) no broker ops experience Kafka API known, service new daily use today
Exit risk (×1) open protocol Kafka-compatible API eases exit already owned
Weighted total (max 70) 48 56 52

Decision

We will adopt Option B, the managed event-streaming service, for order-status notifications.

It scores highest on the criteria that drove this ADR: it removes the 15-minute polling latency and the replica load without making the order-gateway team a broker-operations team, which Option A would require and which the team's on-call capacity cannot absorb before the Q4 consumer onboarding. Option C is cheapest today but fails the latency and replay requirements: consumers that miss messages would be back to polling for reconciliation, which recreates the problem we are solving. The Kafka-compatible API keeps exit risk acceptable: producers and consumers are written against the open protocol, so a later move to self-managed (Option A) remains a configuration change, not a rewrite. EU region pinning satisfies the residency requirement recorded in the Lighthouse data-handling guideline DHG-7 (internal, fictional).

Consequences

Architecture: current vs target

customer portalmobile push e-mail dispatchCRM sync warehouse opsanalytics SELECT … polling · every 15 min orders DB read replica (ADR-009) ≈ 38% of replica read load up to 15 min latency schema coupling × 6

Current state: six consumers poll the orders read replica on a 15-minute cycle.

Decision log

Proposed byR. Okafor (order-gateway tech lead) · draft circulated to consumer teams18 May 2026
Reviewed byA. Kowalczyk (platform), S. de Wit (data & residency) · architecture guild session, comments resolved in order-gateway#39127 May 2026
Accepted byP. Mehta (head of engineering) · ADR-009 marked superseded the same day5 Jun 2026

What this ADR does not decide

Supersedes · ADR-009 (orders read replica) Relates to · ADR-006 (residency & DHG-7) Followed by · ADR-0xx (schema registry, TBD)

Review date: revisit by 5 Dec 2026 (six months after acceptance), or sooner if the cost estimate (≈ €120k/yr) is exceeded or a second region is required.

How this was made: the brief, how to reproduce it, and an honesty note

The brief

Create ADR-014 'Event streaming for order-status notifications' as one
HTML file: context, three options with a weighted criteria table, the
decision and rationale, consequences (positive/negative/neutral), and an
inline SVG diagram with a current-state/target-state toggle. It will live
in the repo next to the code, so one self-contained file, no images.

How to reproduce

Paste the brief into any capable LLM: GPT, Claude, Gemini, Grok, DeepSeek, or the assistant your company provides. Iterate a few rounds on layout and content until it reads well. Save the final answer as a .html file and open it in any browser. Expect similar output, not identical: every model has its own taste, and that is fine.

Honesty note

This reference artifact was built with Claude Code, an LLM coding agent, over several iterations. Treat it as the bar to aim for, not as a guaranteed first answer. All data on this page is fictional.

Next artifact Incident post-mortem →
vishalshah.app