You are building an event-driven microservice using Azure Functions. The function must process messages from an Azure Service Bus queue and write results to Azure Cosmos DB. To minimize cold-start latency and ensure the function scales with message volume, which hosting plan and trigger combination is most appropriate?

Direct Answer (Verified)Reviewed by Sunny (Senior Cloud Engineer)

Correct Answer: Consumption Plan with a Service Bus trigger and Cosmos DB output binding

The Consumption Plan auto-scales based on load, and the Service Bus trigger natively integrates with Azure Service Bus queues so that the function is invoked per message. Using the...

๐Ÿ“‹Part of Microsoft Certified: Azure Developer Associate (AZ-204) ยท Azure Certification Practice
Real Exam ScenarioAzure Functions

You are building an event-driven microservice using Azure Functions. The function must process messages from an Azure Service Bus queue and write results to Azure Cosmos DB. To minimize cold-start latency and ensure the function scales with message volume, which hosting plan and trigger combination is most appropriate?

โœ“ Correct Answer & ExplanationAzure Functions

Correct Answer

Consumption Plan with a Service Bus trigger and Cosmos DB output binding

Why This Answer Is Correct

The Consumption Plan auto-scales based on load, and the Service Bus trigger natively integrates with Azure Service Bus queues so that the function is invoked per message. Using the Cosmos DB output binding eliminates the need for SDK plumbing code.

๐Ÿ“š What This Question Tests

This question evaluates your knowledge of Azure Functions โ€” a core concept tested in Microsoft Certified: Azure Developer Associate (AZ-204). Understanding Azure Functions is essential for designing scalable, secure, and cost-effective cloud architectures. Mastery of this topic will help you answer scenario-based questions confidently on exam day.