You are building an API that needs to send notifications to multiple subscribers. Each subscriber has a different callback URL, and you need to ensure each notification is sent exactly once and retried on failure. Which Azure service should you use?
Trap 1: Azure Event Grid.
Azure Event Grid delivers events to subscriber webhook endpoints, but its retry and delivery model does not guarantee exactly-once delivery to each subscriber. It tempts because it is the natural Azure choice for webhook fan-out, and would be correct if at-least-once delivery with dead-lettering were acceptable.
Trap 2: Azure Notification Hubs.
Azure Notification Hubs pushes to mobile platforms via device registrations and platform notification services, not arbitrary per-subscriber callback URLs. It tempts because the word notifications appears in the stem, and it would be correct if subscribers were iOS, Android or Windows apps receiving push notifications rather than HTTP endpoints.
Trap 3: Azure Queue Storage.
Azure Queue Storage stores messages for a single consumer to poll; it has no subscriber callback URLs and no built-in HTTP delivery or retry to endpoints. It tempts because it decouples senders from receivers, and would fit a worker-pool scenario where a backend service pulls and processes messages itself.
- A
Azure Event Grid.
Why it fails: Azure Event Grid delivers events to subscriber webhook endpoints, but its retry and delivery model does not guarantee exactly-once delivery to each subscriber. It tempts because it is the natural Azure choice for webhook fan-out, and would be correct if at-least-once delivery with dead-lettering were acceptable.
- B
Azure Service Bus.
Service Bus topics with subscriptions deliver each message to every subscriber's callback URL, and its peek-lock delivery plus dead-lettering provides at-least-once retry semantics. This satisfies the exactly-once-per-subscriber fan-out and failure-retry requirements that a simple queue cannot.
- C
Azure Notification Hubs.
Why it fails: Azure Notification Hubs pushes to mobile platforms via device registrations and platform notification services, not arbitrary per-subscriber callback URLs. It tempts because the word notifications appears in the stem, and it would be correct if subscribers were iOS, Android or Windows apps receiving push notifications rather than HTTP endpoints.
- D
Azure Queue Storage.
Why it fails: Azure Queue Storage stores messages for a single consumer to poll; it has no subscriber callback URLs and no built-in HTTP delivery or retry to endpoints. It tempts because it decouples senders from receivers, and would fit a worker-pool scenario where a backend service pulls and processes messages itself.