Chapter 2 · AZ-204: Developing Solutions for Microsoft Azure Connect to and Consume Azure and Third-party Services

Azure Event Grid

20 practice questions · 5 marks weightage

Practice questions

  1. Question 1Q-0F884C

    A company publishes custom business events when an order is created. The company needs to deliver each event independently to an Azure Function, a webhook operated by a partner, and a monitoring application. Which Azure service is most appropriate for distributing these events to multiple consumers?

    1. A.Azure Blob Storage
    2. B.Azure Virtual Network
    3. C.Azure Event Grid
    4. D.Azure Key Vault
    See the answer and solution
  2. Question 2Q-CB7130

    You create an Azure Event Grid event subscription that uses an HTTPS webhook endpoint. During creation, Event Grid sends a SubscriptionValidationEvent containing a validationCode. What should the webhook do to complete validation?

    1. A.Return HTTP 200 with the validationCode as plain text in the response body
    2. B.Return HTTP 200 with a JSON body containing the validationCode in the validationResponse property
    3. C.Send the validationCode to the Event Grid topic as a new event
    4. D.Return HTTP 202 and wait for Event Grid to validate the endpoint asynchronously
    See the answer and solution
  3. Question 3Q-D4520A

    An Event Grid subscription invokes a payment-processing webhook. Because Event Grid provides at-least-once delivery, the same event can occasionally be delivered more than once. The webhook must never charge a customer twice for the same event. Which design best addresses this requirement?

    1. A.Ignore duplicate deliveries because Event Grid guarantees exactly-once delivery
    2. B.Process only the first event received during each five-minute interval
    3. C.Use the Event Grid event.id as an idempotency key with the payment operation or a durable deduplication store
    4. D.Return HTTP 500 for every event so Event Grid stops delivering duplicates
    See the answer and solution
  4. Question 4Q-34AE8A

    A solution must react whenever a blob is created in an Azure Storage account. The team wants Azure to publish the platform-generated storage events without requiring application code to publish custom events. Which Event Grid resource should be used as the event source?

    1. A.An Event Grid system topic for the storage account
    2. B.An Event Grid custom topic
    3. C.An Event Grid domain
    4. D.An Event Hubs namespace
    See the answer and solution
  5. Question 5Q-2912AD

    A storage account publishes BlobCreated events. An Azure Function should receive only events for .jpg files stored in the photos container. Which Azure CLI command creates the most appropriate Event Grid subscription filters?

    1. A.az eventgrid event-subscription create --name photo-sub --source-resource-id <storage-resource-id> --endpoint <function-endpoint> --included-event-types BlobCreated --subject-begins-with "/blobServices/default/containers/photos/blobs/" --subject-ends-with ".jpg"
    2. B.az eventgrid event-subscription create --name photo-sub --source-resource-id <storage-resource-id> --endpoint <function-endpoint> --included-event-types BlobDeleted --subject-begins-with "/blobServices/default/containers/photos/blobs/" --subject-ends-with ".jpg"
    3. C.az eventgrid event-subscription create --name photo-sub --source-resource-id <storage-resource-id> --endpoint <function-endpoint> --included-event-types BlobCreated --subject-begins-with "/blobServices/default/containers/documents/blobs/" --subject-ends-with ".jpg"
    4. D.az eventgrid event-subscription create --name photo-sub --source-resource-id <storage-resource-id> --endpoint <function-endpoint> --included-event-types BlobCreated --subject-begins-with "/blobServices/default/containers/photos/blobs/" --subject-ends-with ".png"
    See the answer and solution

15 more questions on Azure Event Grid

Sign up free to practise the full chapter. Questions you get wrong come back until you've mastered them.

Start practising free

Free to start · No credit card needed