One fact, many reactions
An order is placed once, but billing, shipping and email each need to react. Calling each one directly ties the order code to every reaction and to every outage.
Follow the requestScene 1 / 6
The order service calls the email handler directly, inside its own process.
Illustrative guided sequence, not a simulation or a benchmark.
01 / 06
A local callback
A local callback is an ordinary call made while the publisher is still running. The order service notifies the email handler on the same path, so the call is fast and simple. Nothing is written to a shared log first, and no other component learns that the event exists.
What you will learn
- Explain why a local callback is not a durable event broker.
- Describe how a broker decouples a publisher from its consumers.
- Identify where duplicate delivery and unordered processing can break a consumer.
- Explain how a slow consumer builds a backlog and why it needs limits.
- State when a direct synchronous call is the better choice.
Transcript
- A local callback. A local callback is an ordinary call made while the publisher is still running. The order service notifies the email handler on the same path, so the call is fast and simple. Nothing is written to a shared log first, and no other component learns that the event exists.On screen: The order service calls the email handler directly, inside its own process.
- Crash before the rest run. The order service fails after notifying the email handler but before it reaches the other listeners. The email listener ran before the crash; the billing and shipping listeners never ran, and nothing can replay the event for them.On screen: A local callback has no durable copy, so a crash can drop work that has not run yet.
- Publish to a durable broker. The order service now publishes to an event broker and does not call billing or shipping itself. The broker holds the event until each consumer acknowledges it. Microsoft guidance recommends this acknowledgement step to reduce data loss, but the exact rules depend on the product you choose. A crash before the broker accepts the event still loses it; the next lesson, on the transactional outbox, addresses that gap.On screen: The broker keeps the event until each consumer confirms receipt, so a consumer can be slow or briefly away.
- A slow consumer builds a backlog. The order service keeps publishing and is not held up by the slow shipping service. Events collect in the broker as a backlog for that consumer. Without backpressure (publish limits, consumer scaling, or retention policy), the backlog grows until storage or retention limits block or drop events.On screen: Shipping is degraded, so events wait in the broker while new orders keep arriving.
- Duplicates and ordering. A broker can deliver the same event again after a timeout or a missing acknowledgement. Billing records the IDs of events it has processed, so the second copy is recognised and skipped. Ordering is limited too: a stream keeps events in order only within one partition, so do not assume a global order across the system.On screen: A redelivered event arrives again, so the consumer must recognise it and avoid repeating the work.
- Choose the style on purpose. Use events when several subsystems react to the same fact and the publisher does not wait for their results. Keep a direct request when the caller needs an answer before it can continue. Both choices bring costs in operations, consistency and debugging, so choose with the failure cases in mind.On screen: Events suit one fact with many reactions. A direct request suits a caller that needs an answer now.
Sources
- Event-Driven Architecture Style (Microsoft Learn) accessed 2026-11-26
- Idempotent Consumer (microservices.io) accessed 2026-11-26
Under the hood
How a publisher hands off an event to a durable broker, why a local callback is not the same thing, and how delivery, ordering and backlog shape consumer design.
Trade-offs
- Publishers and consumers are decoupled, so a new consumer can subscribe without changing the publisher.
- Consumers handle events after a delay, so readers in other services can briefly see older state.
- A broker adds operational work: monitoring, retention limits, backlog alerts and replay tooling.
- Duplicate and out-of-order delivery must be handled by consumers. They cannot be assumed away.
When not to use it
- The caller needs the result of the work before it can answer the user.
- The workflow needs strong consistency across services at the moment of the request.
- The team cannot yet monitor and operate a broker, its backlog and its replay process.
Limitations of this lesson
- The broker is drawn as a single queue. Partitions, retention and replication are not modelled.
- Delivery and ordering rules are described in narration only. The animation does not measure them.
- Backlog size is illustrative. No rate, lag or capacity figures are shown.
- Retry policy and dead-letter handling are not animated.