You are designing a microservices architecture where each service needs to publish events to multiple subscribers. You choose Azure Event Grid. However, one of the subscribers is a third-party service that requires HTTPS endpoint and custom headers in the event delivery. How should you configure Event Grid?
The 'Delivery Properties' configuration within an Azure Event Grid event subscription is the precise mechanism for specifying custom HTTP headers. This feature allows users to define key-value pairs that Event Grid will include in the HTTP POST request when delivering an event to the subscriber's endpoint. These custom headers are crucial for scenarios like authentication (e.g., API keys), routing information, or providing context that the receiving service can utilize upon event ingestion.
Why this answer
Azure Event Grid allows you to specify custom HTTP headers in the 'Delivery Properties' section of an event subscription. This feature lets you add static or dynamic headers (e.g., authentication tokens or correlation IDs) that are included in the HTTPS POST request to the subscriber's endpoint. It directly addresses the requirement for custom headers without needing any additional infrastructure.
Exam trap
The trap here is that candidates often confuse 'Advanced Filters' (which filter events) with 'Delivery Properties' (which modify the delivery request), leading them to incorrectly select Option A.
How to eliminate wrong answers
Option A is wrong because 'Advanced Filters' are used to filter which events are delivered based on event data fields (e.g., event type, subject), not to add custom headers to the delivery request. Option B is wrong because Event Grid domains are a logical grouping mechanism for managing multiple topics and subscriptions, but they do not provide a way to add custom headers to individual event deliveries. Option D is wrong because a dead-letter destination handles undelivered events (e.g., after retries are exhausted) by storing them in Blob Storage or Event Hubs; it does not modify the delivery request with custom headers.