Correct Answer: Add 'SingletonAttribute' and set 'Mode = SingletonMode.Listener' on the function
The [Singleton] attribute with Mode = SingletonMode.Listener ensures that only one instance of a timer-triggered function runs at a time across all instances of the function app, p...
Correct Answer
Add 'SingletonAttribute' and set 'Mode = SingletonMode.Listener' on the function
Why This Answer Is Correct
The [Singleton] attribute with Mode = SingletonMode.Listener ensures that only one instance of a timer-triggered function runs at a time across all instances of the function app, preventing duplicate executions in scaled-out scenarios.
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.
You are building an Azure Function that processes orders from an Azure Service Bus queue. The function must ensure that each order is processed exactly once, even if the function crashes mid-processing. Which Service Bus feature guarantees this behavior?
Your Azure Function app needs to store temporary state between multiple function executions as part of a long-running workflow. The workflow includes human approval steps that can pause for days. Which solution should you implement?
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?
You are designing an Azure Function workflow that coordinates a complex, long-running order processing system. The workflow must execute three tasks in sequence (Validate Order, Charge Card, Ship Item). If the 'Charge Card' step fails, it must execute a compensating transaction to void the order. The orchestrator must be able to pause its execution without consuming billing resources while waiting for tasks to complete. Which feature should you use?