You are developing a .NET background service that processes high-value medical prescription renewal messages from an Azure Service Bus queue named `prescriptions-queue`. The system has the following requirements:
1. Messages must be processed reliably; if the application crashes or restarts while a message is being processed, the message must not be lost and must be made available for reprocessing.
2. The application must authenticate to the Service Bus namespace using a managed identity that has an independent lifecycle from the hosting Azure resource.
3. The identity must follow the principle of least privilege, with permissions scoped directly to the queue rather than the entire namespace or resource group.
Which combination of Azure Role-Based Access Control (RBAC) role assignment and code implementation should you use?
- AAssign the Azure Service Bus Data Receiver role to a System-Assigned Managed Identity at the resource group scope. In code, instantiate the ServiceBusClient using DefaultAzureCredential without specifying a client ID, and create the ServiceBusProcessor using ServiceBusProcessorOptions set to ServiceBusReceiveMode.PeekLock.
- Assign the Azure Service Bus Data Receiver role to the User-Assigned Managed Identity at the queue scope. In code, instantiate the ServiceBusClient using DefaultAzureCredential configured with the identity's client ID, and create the ServiceBusProcessor using ServiceBusProcessorOptions set to ServiceBusReceiveMode.PeekLock.Cevap
- CAssign the Azure Service Bus Data Receiver role to the User-Assigned Managed Identity at the queue scope. In code, instantiate the ServiceBusClient using DefaultAzureCredential configured with the identity's client ID, and create the ServiceBusProcessor using ServiceBusProcessorOptions set to ServiceBusReceiveMode.ReceiveAndDelete.
- DGenerate a Shared Access Signature (SAS) token at the Service Bus Namespace level with Manage, Send, and Listen permissions. In code, instantiate the ServiceBusClient using the namespace connection string containing the SAS token, and create the ServiceBusProcessor using ServiceBusProcessorOptions set to ServiceBusReceiveMode.PeekLock.