Microsoft Azure Developer Associate AZ-204 Practice Question
A background service writes order information as messages to an Azure Storage queue named "orders". Each message must be processed within 3 days; afterwards it should be automatically deleted by the queue service without any custom cleanup code. You will update the code that adds the messages.
Which change will meet this requirement while using the Azure.Storage.Queues SDK for .NET?
Configure a separate dead-letter queue and redirect messages to it after 3 days.
Specify TimeSpan.FromDays(3) as the timeToLive argument in QueueClient.SendMessageAsync.
Add a Storage queue SAS that expires after 3 days and use it when sending the message.
Set the visibilityTimeout parameter of QueueClient.SendMessageAsync to TimeSpan.FromDays(3).
When you add a message by calling QueueClient.SendMessageAsync you can set the timeToLive parameter. The queue service automatically deletes any message whose age exceeds the specified time-to-live. Setting timeToLive to TimeSpan.FromDays(3) satisfies the 3-day retention requirement with no additional logic. Changing the visibility timeout affects only the first dequeue attempt, attaching a dead-letter queue is not supported for Azure Storage queues, and a queue SAS does not control message lifetime.
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 timeToLive argument in QueueClient.SendMessageAsync?
Open an interactive chat with Bash
What is the difference between timeToLive and visibilityTimeout in Azure Storage Queues?
Open an interactive chat with Bash
Why is a Storage SAS not suitable for controlling message lifetimes?
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 .