Question

Difficulty: MediumImplement Azure Event Hubs Solutions

You are developing a C# console application that will run in an Azure Container Instance (ACI). The application is designed to consume telemetry data from an Azure Event Hub using the EventProcessorClient from the Azure.Messaging.EventHubs NuGet package. Checkpointing and partition ownership must be tracked using Azure Blob Storage, and the application must authenticate using a user-assigned managed identity.

Which of the following Azure role-based access control (RBAC) roles must you assign to the managed identity to ensure the application can both read events and manage checkpoints? (Select TWO.)

  1. Storage Blob Data Contributor on the Azure Storage containerAnswer
  2. Azure Event Hubs Data Receiver on the Azure Event HubAnswer
  3. C
    Storage Blob Data Reader on the Azure Storage container
  4. D
    Azure Event Hubs Data Sender on the Azure Event Hub

Answer

Storage Blob Data Contributor on the Azure Storage container and Azure Event Hubs Data Receiver on the Azure Event Hub
To consume events and track progress, the managed identity requires both the Azure Event Hubs Data Receiver role to read events from the partitions, and the Storage Blob Data Contributor role on the storage container to create, modify, and delete lease/checkpoint blobs.

Step-by-Step Solution

1
Identify the permissions required for consuming events from Azure Event Hubs.
The application needs to connect to the Event Hub and read partition events, which requires the Azure Event Hubs Data Receiver role.
Without receiver permissions, the EventProcessorClient cannot establish a partition receiver connection to pull event streams.
2
Identify the permissions required for partition checkpointing and ownership storage.
The application needs to read, write, and delete blobs inside the Azure Blob Storage container to handle leases and checkpoint offsets, which requires the Storage Blob Data Contributor role.
The EventProcessorClient uses blobs as a coordination mechanism. It must acquire leases and write checkpoint state, which requires write/delete permissions on the blobs.

Key Concept

Azure Event Hubs consumer permissions and Blob Storage checkpointing role requirements
Rate this question