AZ-204 Develop Azure compute solutions Practice Question
A company uses Azure Functions with a consumption plan. The function processes messages from a queue. During peak hours, the function takes longer to execute, and some messages are processed twice. What is the most likely cause?
⚠ Common exam trap
Many candidates confuse the function timeout (which terminates execution) with the queue visibility timeout (which controls message re-delivery), leading them to incorrectly select option A.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
The queue message visibility timeout is shorter than the function processing time.
In Azure Functions with a consumption plan, the queue message visibility timeout determines how long a message is invisible to other consumers after being dequeued. If the function's processing time exceeds this visibility timeout, the message becomes visible again and can be picked up by another function instance, leading to duplicate processing. This is the most likely cause of messages being processed twice during peak hours when execution times increase.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
The function timeout is set too low.
Why it's wrong here
If an Azure Function times out, its execution is terminated prematurely, preventing it from completing its processing and deleting the queue message. While this leads to an incomplete operation, it does not inherently cause the same message to be processed simultaneously by multiple function instances. Instead, the message would eventually become visible again in the queue, allowing for a subsequent attempt, but the timeout itself isn't the direct cause of duplicate processing by separate, concurrent executions.
- ✓
The queue message visibility timeout is shorter than the function processing time.
Why this is correct
When the queue message visibility timeout is shorter than the actual function processing time, the message becomes visible again in the queue before the initial function instance has successfully completed its work and deleted the message. This allows another available function instance, potentially on a different host, to pick up and process the exact same message. This concurrent processing of the same message by multiple instances is the direct cause of duplicate operations.
- ✗
The function uses blob output binding incorrectly.
Why it's wrong here
An incorrect configuration or error in a blob output binding would specifically affect the function's ability to write data to Azure Blob Storage. Such an issue would typically manifest as a failure in the output operation itself, potentially causing the function to error out or complete without the desired side effect. However, it does not directly influence the queue trigger's behavior or the message visibility mechanism that leads to an input message being processed multiple times.
- ✗
The function app is using a premium plan instead of consumption.
Why it's wrong here
The choice of an Azure Functions hosting plan, whether Consumption or Premium, primarily impacts scaling, VNET integration, and pre-warmed instances, not the fundamental behavior of Azure Storage Queue message visibility. The mechanism where a message becomes visible again if its processing exceeds the visibility timeout is inherent to Azure Storage Queues themselves. Therefore, switching to a Premium plan would not resolve duplicate processing if the visibility timeout remains shorter than the function's execution duration.
Quick reference
Cloud Service Model Comparison
| Model | You Manage | Provider Manages | Examples |
|---|---|---|---|
| IaaS | OS, runtime, apps, data | Hardware, hypervisor, networking | EC2, Azure VMs, GCP Compute Engine |
| PaaS | Apps and data | OS, runtime, middleware, hardware | Elastic Beanstalk, Azure App Service |
| SaaS | Data and settings only | Everything else | Microsoft 365, Salesforce, Workday |
| FaaS / Serverless | Function code only | Infra, scaling, runtime | Lambda, Azure Functions, Cloud Run |
| CaaS | Containers and apps | Kubernetes, OS, hardware | EKS, AKS, GKE |
Go deeper
Related to this question
Learn chapter
Azure Functions Development
Key term
Durable Functions
Durable Functions is an extension of Azure Functions that lets you write stateful workflows in code, managing complex sequences of tasks, retries, and delays automatically.
Key term
Azure Functions Bindings
Azure Functions Bindings are declarative connections that link your serverless function code to Azure services or external resources, handling input and output data automatically without writing extra networking or authentication code.
About these practice questions
This AZ-204 question is part of Courseiva's 881-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-204 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-204 exam.