Fan-out a DocumentIngested event to three independent consumers
Short answer
B Use an Event Grid topic or a Service Bus topic with three subscriptions so indexing, notification, and audit each receive an independent copy of the DocumentIngested event and can fail and retry in isolation.
Question
Key Takeaways
Fan-out to independent consumers requires publish/subscribe delivery, so an Event Grid or Service Bus topic with three subscriptions is the right design. Each subscription holds its own copy of the DocumentIngested event with its own retry and dead-letter state, letting indexing, notification, and audit fail in isolation. A single queue with competing consumers, a synchronous function, or a shared Redis list cannot provide per-consumer copies.
Expert Analysis
Publish/subscribe via an Event Grid topic (three subscriptions) or a Service Bus topic (three subscriptions) delivers an independent copy to each consumer, so each can retry or fail in isolation. A single queue with competing consumers delivers each message to only one consumer, a synchronous fan-out couples the consumers' failures, and a shared Redis list does not provide independent per-consumer delivery and retry.
The deciding constraint is independent failure and retry per consumer. A topic/subscription topology gives each subscriber its own delivery cursor into the same published event, so the indexing consumer can be dead-lettering a poison message while notification and audit continue to drain their own subscriptions unaffected. Option B names exactly that: an Event Grid topic with three subscriptions, or a Service Bus topic with three subscriptions, where each of indexing, notification and audit receives its own copy of DocumentIngested. The two products differ in posture but satisfy the requirement equally — Event Grid pushes events to handlers with per-subscription retry and dead-lettering, while Service Bus topics hold messages in per-subscription queues with their own lock, delivery-count and dead-letter state.
Option A fails on a specific mechanism: a single Service Bus queue read by all three consumers makes them competing consumers. Each message is delivered to exactly one receiver and completed or abandoned by that receiver; there is no per-consumer copy. If indexing takes the DocumentIngested message and fails, notification and audit never see it at all, and retry semantics belong to whichever consumer grabbed the message. That is load balancing, not fan-out.
Option C couples the three downstream actions inside one function invocation. If the notification call times out after indexing already succeeded, the whole invocation is retried or fails as a unit, so audit may run twice or not at all, and the failure of one branch propagates to the others. It also removes any per-consumer retry policy, since a single function execution has one retry behaviour rather than three independent ones.
Option D is the weakest: a Redis list is a shared mutable structure, and consumers popping from it compete for the same entries exactly as in option A, with no per-consumer offset, no delivery-count tracking, and no built-in dead-lettering. Durability and retry would have to be hand-built and would still not produce independent copies for three consumers.
A mechanism worth stating explicitly
Subscription-level filtering is what keeps the fan-out cheap and correct when the three consumers care about different events on the same topic. A Service Bus topic subscription can carry a SQL or correlation filter so that, for example, the audit subscription keeps every DocumentIngested event while the notification subscription narrows to a property such as a document classification, and each subscription's filter is evaluated independently of the others. Combined with per-subscription MaxDeliveryCount and dead-letter queues, this means a filter or handler problem on one subscription cannot consume another subscription's quota or advance its cursor. Event Grid gives the analogous control through event subscriptions with subject and event-type filters plus their own retry schedule and dead-letter destination. The choice between the two then becomes about delivery model — Event Grid for discrete, near-real-time reactive events, Service Bus topics when the consumers need message locking, sessions, scheduled enqueueing or long retry windows.
Applying it
The requirement names three independent consumers that must each fail and retry in isolation from a single event, which is the textbook definition of publish/subscribe fan-out. Any option that delivers one copy to a shared reader (A, D) or executes the three consumers in one call path (C) violates that isolation, so B is the only design that satisfies the constraint as written.
Official Reference
- https://learn.microsoft.com/en-us/azure/service-bus-messaging/service-bus-queues-topics-subscriptions
- https://learn.microsoft.com/en-us/azure/event-grid/event-schema
- https://learn.microsoft.com/en-us/azure/event-grid/delivery-and-retry
These links open the official vendor documentation in a new tab.
Exam Strategy
Scan the requirement for the words that describe delivery semantics — 'each consumer gets a copy', 'independent retry', 'fail in isolation' — and map them to topics and subscriptions. Options that name a single queue, a shared list, or one function calling everything in sequence are competing-consumer or coupled designs and should be eliminated first. When two products (Event Grid and Service Bus topics) satisfy the same requirement, an option that pairs them as alternates is usually the intended answer.
Related Analysis
Practice All AI-200 Questions
Access 69 questions with complete answers and detailed explanations.
View Full AI-200 Practice Test →