AZ-204 Communication & Stakeholder Relations 5 — Questions and Answers
Question 1: A Service Bus consumer has locked a message for processing but the processing job takes longer than the lock duration. What should the developer do to avoid the message being requeued prematurely?
- Call RenewMessageLockAsync before the lock expires (Correct answer)
- Increase the max delivery count on the queue
- Set the message TTL to a longer value
- Move the message to the dead-letter queue manually
Correct answer: Call RenewMessageLockAsync before the lock expires
RenewMessageLockAsync extends the message lock on the broker, preventing the message from being requeued while long-running processing continues.
Question 2: A company uses Event Grid domains to manage events across hundreds of topics. How does a domain simplify publishing for the application?
- A single endpoint and key can publish to any topic within the domain (Correct answer)
- All topics in the domain share one subscription
- The domain automatically fans out events to all Azure regions
- Domains eliminate the need for event schemas
Correct answer: A single endpoint and key can publish to any topic within the domain
Event Grid domains provide a single publishing endpoint so applications can publish to any of the domain's topics using one set of credentials.
Question 3: A developer enables duplicate detection on a Service Bus queue with a window of 10 minutes. A message with the same MessageId is sent twice within that window. What happens?
- The second message is silently discarded by the broker (Correct answer)
- Both messages are delivered and the consumer must deduplicate
- The second message replaces the first in the queue
- The queue enters a dead-letter state
Correct answer: The second message is silently discarded by the broker
When duplicate detection is enabled, Service Bus tracks MessageIds in a time window and silently drops any message with a duplicate ID received during that window.
Question 4: A team migrating from an on-premises Kafka cluster to Azure wants to reuse existing Kafka producer and consumer code unchanged. Which Azure service supports the Kafka protocol surface natively?
- Azure Event Hubs with Kafka endpoint enabled (Correct answer)
- Azure Service Bus with AMQP bridge
- Azure IoT Hub with Kafka connector
- Azure Event Grid with Kafka schema
Correct answer: Azure Event Hubs with Kafka endpoint enabled
Event Hubs exposes a Kafka-compatible endpoint so existing Kafka clients can connect without code changes by pointing to the Event Hubs namespace.
Question 5: A critical Service Bus namespace must survive a regional outage. Which feature should be configured to replicate metadata to a secondary namespace and allow manual failover?
- Geo-disaster recovery pairing (Correct answer)
- Availability Zones with zone redundancy
- Geo-replication (active replication)
- Premium tier with auto-scaling
Correct answer: Geo-disaster recovery pairing
Service Bus Geo-disaster recovery pairs a primary and secondary namespace, replicating entity metadata so you can initiate a manual failover during a regional outage.
Question 6: An Event Grid subscription has dead-lettering enabled. Events that cannot be delivered after all retries are exhausted are sent where?
- A configured Azure Storage blob container (Correct answer)
- The Event Grid system topic dead-letter queue
- An Azure Service Bus dead-letter subqueue
- Back to the event publisher
Correct answer: A configured Azure Storage blob container
Event Grid dead-lettering stores undeliverable events in an Azure Storage Blob container that you configure on the event subscription.
Question 7: A developer has received a Service Bus message that cannot be processed immediately but should be retried after other pending messages are handled. Which operation preserves the message in the queue without incrementing the delivery count?
- Defer the message using DeferMessageAsync (Correct answer)
- Abandon the message using AbandonMessageAsync
- Schedule the message for future delivery
- Move the message to the dead-letter queue
Correct answer: Defer the message using DeferMessageAsync
DeferMessageAsync moves the message to a deferred state where it is invisible to normal receivers and can be retrieved later by its sequence number, without incrementing the delivery count.
A Service Bus consumer has locked a message for processing but the processing job takes longer than the lock duration.
What should the developer do to avoid the message being requeued prematurely?