4 · Serverless & event-driven

12. Event-Driven and Managed-Service Architecture

Queues, topics, event buses, idempotency and choreographed workflows.

10 min read · 3 MCQs

Decoupling with messaging

A queue gives point-to-point work distribution with retries and a dead-letter queue; a topic fans one event out to many subscribers; an event bus adds content-based routing rules. Producers stop caring who consumes, which is what makes independent scaling possible.

Delivery semantics

Most systems guarantee at-least-once delivery, so consumers must be idempotent — deduplicate on an event id or make the write naturally repeatable. Ordering is only guaranteed within a partition or FIFO group; assume reordering otherwise.

Composing services

Managed workflow engines (Step Functions, Durable Functions, Workflows) express retries, timeouts, parallel branches and compensation as state machines rather than bespoke glue. Prefer managed primitives for undifferentiated plumbing and spend engineering time on domain logic.

Chapter quiz

3 questions · pass mark 75%
  1. 1. At-least-once delivery requires consumers to be…

  2. 2. A dead-letter queue holds…

  3. 3. Topics differ from queues because they…

Answer every question to submit. Progress for cl-12 is saved in this browser.