Microsoft Azure Developer Associate AZ-204 Practice Question
Your application publishes commands to an Azure Service Bus topic. Transient network failures occasionally cause the publishing code to retry, resulting in duplicate messages with the same MessageId being delivered to downstream microservices. You must ensure that retries remain enabled, but each command is processed only once without modifying consumer logic. Which Service Bus capability should you enable on the topic to meet the requirement?
Enable duplicate detection and set an appropriate history time window.
Enable sessions and have consumers accept a session.
Configure the subscription MaxDeliveryCount property to 1.
Duplicate detection is a built-in feature of Azure Service Bus. When it is enabled, the broker keeps a cache of MessageId values for the configured history time window (up to seven days). If a message with an identical MessageId arrives within that window, Service Bus discards the duplicate, so the downstream consumer receives only the first instance. Partitioning improves throughput and availability but does not remove duplicates. Sessions provide ordered, stateful message processing, not deduplication. Lowering MaxDeliveryCount affects redelivery of a single message that has failed processing; it cannot prevent multiple identical messages that originate from separate send operations.
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 Azure Service Bus duplicate detection?
Open an interactive chat with Bash
How does the history time window in duplicate detection work?
Open an interactive chat with Bash
What is the role of the MessageId property in Azure 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 .