Microsoft Certified: Azure Developer Associate (AZ-204)Develop Azure compute solutionsHard

A company is developing a new application that will process a high volume of messages from an Azure Service Bus queue. The processing involves complex business logic, and each message must be processed reliably, even if there are transient errors. The application needs to be able to scale out automatically based on the queue length and process messages concurrently. Which Azure Functions trigger and hosting plan combination is MOST appropriate for this scenario?

  1. ATimer Trigger with Premium Plan
  2. BService Bus Trigger with Consumption Plan
  3. CService Bus Trigger with Premium Plan
  4. DHTTP Trigger with Consumption Plan
Show answer & explanation

Correct answer: C. Service Bus Trigger with Premium Plan

A Service Bus Trigger allows Azure Functions to react to messages in a Service Bus queue, and the Premium Plan provides features like pre-warmed instances for rapid scaling, VNet connectivity (if needed for secure access to other resources), and crucially, an unlimited execution duration, which is important for complex business logic and reliable processing, even with transient errors that might cause retries.

Why the other options are wrong

  • A. Timer Trigger is for scheduled execution, not for reacting to messages from a Service Bus queue. Premium Plan offers benefits but is paired with the wrong trigger.
  • B. Service Bus Trigger is correct for processing messages, but the Consumption Plan, while cost-effective, has a 10-minute timeout limit, which might be insufficient for complex business logic with potential retries and could lead to message processing failures for long-running tasks.
  • D. HTTP Trigger is for web requests, not for processing messages from a Service Bus queue. Consumption Plan has a 10-minute timeout limit.

Azure Functions Service Bus Trigger & Premium Plan

Using an Azure Function to react to messages from a Service Bus queue, hosted on a Premium Plan for advanced scaling, VNet access, and extended execution times.

  • Service Bus Trigger: Responds to queue/topic messages
  • Premium Plan: Pre-warmed instances, VNet access, unlimited runtime
  • Automatic scaling based on queue length (via KEDA)
  • Ensures reliable processing for complex/long-running tasks

Memory trick: Service Bus Trigger with Premium for Power and Persistence

More Develop Azure compute solutions questions