Connect to and consume Azure services and third-party services →mediumMultiple ChoiceObjective-mapped
AZ-204 Practice Question: Connect to and consume Azure services and third-party services
A company is developing an application that processes orders. The application uses Azure Service Bus queues to decouple order submission from processing. During peak hours, some messages are not processed within the required time, causing order delays. The team needs to increase throughput without changing the existing message processing logic. What should they do?
⚠ Common exam trap
Watch out — candidates often confuse increasing lock duration (a reliability setting) with increasing throughput, or they assume that enabling sessions or switching to Event Hubs will magically improve performance without understanding the fundamental scalability mechanism of competing consumers.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Increase the number of concurrent listeners on the queue.
Increasing the number of concurrent listeners on the Service Bus queue allows multiple message receivers to process messages in parallel, directly increasing throughput without altering the existing message processing logic. This leverages the competing consumers pattern, where each listener independently receives and processes messages from the same queue, effectively scaling out the processing capacity.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Use Azure Event Hubs instead of Service Bus.
Why it's wrong here
Azure Event Hubs is primarily designed for high-throughput, low-latency ingestion of millions of events per second, typically used for telemetry, logging, and stream analytics where events are retained for a period for multiple consumers to read. It functions as a data stream pipeline rather than a traditional message queue for reliable, transactional command processing. For decoupled command processing requiring reliable delivery, 'at-least-once' semantics, and message removal upon successful processing, Azure Service Bus queues are the appropriate choice due to their robust messaging features and transactional capabilities.
- ✓
Increase the number of concurrent listeners on the queue.
Why this is correct
Increasing the number of concurrent listeners on an Azure Service Bus queue directly enhances the application's ability to process messages in parallel. Each additional listener can fetch and process messages independently, allowing multiple messages to be consumed simultaneously from the queue. This parallel processing significantly boosts the overall message throughput, reducing the backlog and improving the responsiveness of the order processing application by distributing the workload across more consumer instances.
- ✗
Enable sessions on the queue to group related messages.
Why it's wrong here
Enabling sessions on an Azure Service Bus queue is a feature designed to ensure ordered processing of related messages by grouping them under a unique session ID, guaranteeing that messages within a session are delivered to a single receiver in sequence. While crucial for scenarios requiring strict message ordering or stateful processing, sessions do not inherently increase overall queue throughput for independent messages. In fact, by enforcing serial processing within each session, they can limit parallelism if there are few active sessions, potentially reducing the aggregate processing rate compared to a non-session-enabled queue with many independent messages.
- ✗
Increase the lock duration on messages.
Why it's wrong here
The lock duration on a Service Bus message specifies the period for which a message is held exclusively by a receiver before it is automatically returned to the queue if not completed. Increasing this duration primarily serves to prevent messages from prematurely becoming available to other consumers if the current receiver takes longer than expected to process it, thereby avoiding duplicate processing attempts. However, a longer lock duration does not accelerate the actual message processing speed or increase the rate at which new messages are consumed from the queue; it merely extends the reservation period for an already-received message.
Go deeper
Related to this question
Learn chapter
Azure Functions Development
Key term
Azure Relay
Azure Relay is a cloud service that securely exposes on-premises web services to the public internet or other cloud applications without opening firewall ports.
Key term
Azure Service Bus
Azure Service Bus is a cloud-based message broker that allows applications, services, and devices to send and receive messages reliably, even when they are not all running at the same time.
About these practice questions
One of 881 original AZ-204 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AZ-204 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AZ-204 exam.