Microsoft Azure Developer Associate AZ-204 Practice Question
You are developing a microservice that uses the Azure.Messaging.ServiceBus SDK to send commands to a Service Bus queue. For certain high-value orders, the command must not become visible to consumers until exactly 30 minutes after it is created. Without adding extra queues or using external schedulers, which API call should you use to meet this requirement?
Call ScheduleMessageAsync and specify an EnqueueTimeUtc that is 30 minutes in the future.
Send the message normally and then call DeferAsync on it to make it invisible for 30 minutes.
Send the message and immediately call AbandonMessageAsync with a 30-minute visibility timeout.
Call SendMessageAsync and set the TimeToLive property of the message to 30 minutes.
Service Bus supports delayed delivery through scheduled messages. The client application calls ScheduleMessageAsync on a ServiceBusSender, supplying the message and a future EnqueueTimeUtc value. The broker stores the message invisibly and automatically makes it available to receivers when the scheduled time arrives-in this case, current time plus 30 minutes. TimeToLive only defines when messages expire and are dead-lettered; it cannot postpone initial delivery. DeferAsync is invoked by the receiver, not the sender, and merely hides an already-received message until retrieved by sequence number. AbandonMessageAsync unlocks a currently locked message immediately; it provides no mechanism to set a visibility timeout. Therefore, scheduling the message is the only option that meets the requirement without additional infrastructure.
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 ScheduleMessageAsync in Azure Service Bus?
Open an interactive chat with Bash
How does TimeToLive differ from scheduled delivery in Azure Service Bus?
Open an interactive chat with Bash
Why can't DeferAsync or AbandonMessageAsync be used for delayed delivery in Service Bus?
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 .