Microsoft Azure Developer Associate AZ-204 Practice Question
Your application adds work items to an Azure Storage queue. A worker role dequeues one message at a time and starts processing. Some items require up to 10 minutes to finish. While a message is being processed, no other worker must be able to see it, even when processing lasts longer than the original visibility timeout that was set when the message was fetched. Which approach meets this requirement?
Set a 15-minute time-to-live (TTL) on each message when it is enqueued.
Periodically call UpdateMessageAsync on the in-process message, supplying a new visibility timeout that extends past the expected completion time.
Increase the queue's MaxDequeueCount setting to 20 in the Azure portal.
Read messages with PeekMessageAsync instead of ReceiveMessageAsync so the message remains hidden from other workers.
When a message is dequeued with ReceiveMessages or ReceiveMessageAsync, the SDK returns a pop receipt and sets a visibility timeout (30 seconds by default, up to 7 days). If processing might out-last that period, the worker should periodically call UpdateMessage or UpdateMessageAsync, passing the pop receipt and a new visibility timeout. This renews the invisibility window for the same message without changing its contents, so other workers cannot receive it while it is still being handled.
Peeking does not hide the message and therefore allows other consumers to see it. The message's time-to-live controls when it is automatically removed from the queue, not its visibility while being processed. MaxDequeueCount is a property of the Azure Functions poison-message behavior and does not affect basic Storage queue retrieval semantics, so changing it would not prevent multiple workers from accessing the same message.
Ask Bash
Bash is our AI bot, trained to help you pass your exam. AI Generated Content may display inaccurate information, always double-check anything important.
What is the visibility timeout in Azure Storage Queues?
Open an interactive chat with Bash
What is a pop receipt and how is it used?
Open an interactive chat with Bash
What happens if a worker does not call UpdateMessageAsync before the visibility timeout expires?
Open an interactive chat with Bash
Microsoft Azure Developer Associate AZ-204
Connect to and consume Azure services and third-party services
Your Score:
Report Issue
Bash, the Crucial Exams Chat Bot
AI Bot
Loading...
Loading...
Loading...
Pass with Confidence.
IT & Cybersecurity Package
You have hit the limits of our free tier, become a Premium Member today for unlimited access.
Military, Healthcare worker, Gov. employee or Teacher? See if you qualify for a Community Discount.
Monthly
$19.99
$19.99/mo
Billed monthly, Cancel any time.
3 Month Pass
$44.99
$14.99/mo
One time purchase of $44.99, Does not auto-renew.
MOST POPULAR
Annual Pass
$119.99
$9.99/mo
One time purchase of $119.99, Does not auto-renew.
BEST DEAL
Lifetime Pass
$189.99
One time purchase, Good for life.
What You Get
All IT & Cybersecurity Package plans include the following perks and exams .