← All patterns The problem A completed order must update analytics and trigger notifications without the producer calling both systems directly.
When it fits Several independent consumers need the same event and can handle asynchronous delivery.
The whole architecture
Architecture diagram Download SVG One published event is copied into independent subscriptions; each subscriber owns its own progress.
Purple arrows are asynchronous event delivery. Workers within one subscription compete for its messages.
publish subscribe architecture One published event is copied into independent subscriptions; each subscriber owns its own progress. Purple arrows are asynchronous event delivery. Workers within one subscription compete for its messages. Analytics subscription Notification subscription publisher → topic: publish topic → analytics-sub: copy topic → notify-sub: copy analytics-sub → analytics: deliver / ACK notify-sub → notifications: deliver / ACK publish copy copy deliver / ACK deliver / ACK Publish a fact without calling every interested consumer. Publisher Stable business event Fan-out supplies independent deliveries under the chosen broker contract. Topic / broker Subscription routing Analytics progress does not advance notification progress. Analytics sub Independent cursor / ACK A stalled subscription needs its own retention and recovery policy. Notification sub Independent cursor / ACK Workers within this subscription share its work. Analytics handler Subscriber worker pool Duplicate delivery still needs effect protection. Notification handler Subscriber worker pool These policies belong to an explicit messaging contract. Delivery policies Retention, retries, ordering and duplicate handling Select a component, or focus it and press Enter, to read its role.
Two subscribers receive independent deliveries; two workers in one subscription do not create a second subscriber. A publisher acknowledgment is separate from completion in every subscription. Walk through the design
Follow one operation Core flow Failure & recovery
Select a step to highlight its participants. This conceptual walkthrough is separate from challenge scoring.
Each outgoing topic branch is an independent subscription, rather than another worker in the same subscription.
1 Publish a fact2 Fan out to subscriptions3 Track acknowledgments separatelyStep 1 of 3 Publish a fact Producer emits a stable event describing a completed operation.
← Previous Restart Next step →
Trade-offs to make explicit Separate subscriptions let consumers progress independently; fan-out adds storage, delivery and operations cost. Workers inside one subscription can share work. Independent subscriptions each receive the event under the chosen broker contract. Failure modes to plan for An acknowledgment can be lost after processing, causing redelivery to that subscription. A slow subscription needs retention limits and recovery; one consumer catching up does not prove every subscriber is current. Before you build Explain your decision How would you distinguish two independent subscriptions from two workers competing in the same subscription?
Use Plan & estimate inside practice to record your assumptions and trade-offs.
These links open the original challenges. Existing round unlocks, completions and points apply.
One provider stalled; the others still deliver Related practice in independent delivery and idempotency. It does not simulate topic subscriptions or broker fan-out.
Open challenge → Further reading Microsoft · Publisher-subscriber ↗
Original PractiseGrid explanations and conceptual diagrams, with primary references for further study. Dedicated scored exercises can be added as coverage grows.