0
0
Azurecloud~20 mins

Functions with queue triggers in Azure - Practice Problems & Coding Challenges

Choose your learning style9 modes available
Challenge - 5 Problems
🎖️
Azure Queue Trigger Master
Get all challenges correct to earn this badge!
Test your skills under time pressure!
service_behavior
intermediate
2:00remaining
How does an Azure Function with a queue trigger behave when the queue message is malformed?

You have an Azure Function triggered by an Azure Storage Queue. The function expects the message to be a JSON string with specific properties.

What happens if the function receives a message that is not valid JSON?

AThe function processes the message successfully and logs a warning.
BThe function ignores the message and deletes it from the queue immediately.
CThe function fails and the message is moved to the poison queue after max retries.
DThe function crashes and the message remains in the queue indefinitely.
Attempts:
2 left
💡 Hint

Think about how Azure Functions handle errors and retries with queue triggers.

Configuration
intermediate
2:00remaining
Which configuration setting controls the maximum number of times an Azure Function retries a queue message?

You want to limit how many times your Azure Function retries processing a queue message before moving it to the poison queue.

Which setting controls this behavior?

Ahost.json > queues > maxDequeueCount
Blocal.settings.json > functionTimeout
Chost.json > queues > batchSize
Dfunction.json > retryPolicy
Attempts:
2 left
💡 Hint

Look for a setting related to dequeue count in the host.json file.

Architecture
advanced
2:00remaining
Designing a scalable Azure Function with queue trigger for high message volume

You have a queue that receives thousands of messages per minute. You want your Azure Function to process messages quickly and scale automatically.

Which approach best supports this requirement?

ASet a high batchSize and enable function app auto-scale with multiple instances.
BSet batchSize to 1 and disable auto-scale to avoid concurrency issues.
CUse a single instance with multiple threads to process messages sequentially.
DManually create multiple function apps each with a queue trigger to share the load.
Attempts:
2 left
💡 Hint

Think about batch processing and automatic scaling features of Azure Functions.

security
advanced
2:00remaining
Securing access to Azure Storage Queue used by Azure Function queue trigger

You want to ensure that only your Azure Function can read messages from the Azure Storage Queue it listens to.

Which is the best practice to secure this access?

AUse a shared access signature (SAS) token hardcoded in the function app settings.
BUse a managed identity for the function app and assign Storage Queue Data Contributor role to it.
CMake the queue public so the function can access it without credentials.
DEmbed the storage account key directly in the function app code for authentication.
Attempts:
2 left
💡 Hint

Consider Azure's recommended identity and access management features.

🧠 Conceptual
expert
2:00remaining
What happens to an Azure Function queue trigger when the queue is empty for a long time?

Your Azure Function is triggered by messages in an Azure Storage Queue. The queue becomes empty and stays empty for hours.

What is the behavior of the function app during this time?

AThe function app processes empty messages generated automatically to keep alive.
BThe function app keeps running at minimum instances, polling the queue continuously and consuming CPU.
CThe function app crashes due to lack of messages and requires manual restart.
DThe function app scales down to zero instances and stops consuming resources until new messages arrive.
Attempts:
2 left
💡 Hint

Think about how Azure Functions scale with triggers and idle time.