Courseiva

AZ-204 Practice Question: Connect to and consume Azure services and third-party services

A company uses Azure Service Bus to decouple microservices. They need to ensure that messages are processed in the order they are received, and that each message is handled by exactly one consumer instance even when the system scales out. Which feature should they enable?

⚠ Common exam trap

It's easy for candidates to confuse topics (which support multiple subscribers) with the need for ordering and single-consumer processing, overlooking that sessions are the specific feature designed for FIFO and exclusive consumption in a competing-consumers pattern.

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

Sessions

Sessions in Azure Service Bus enforce first-in-first-out (FIFO) ordering and guarantee that all messages with the same session ID are processed by a single consumer instance. This ensures strict message ordering and exactly-once processing per session, even when multiple consumers are scaled out. Without sessions, competing consumers would break ordering because messages could be processed by different instances concurrently.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Sessions

    Why this is correct

    Azure Service Bus Sessions provide guaranteed ordered delivery (FIFO) and single-consumer processing for related messages. Messages belonging to the same session, identified by a `SessionId` property, are delivered exclusively to a single receiver. This receiver acquires an exclusive lock on the session, ensuring that all messages within that session are processed sequentially by only one consumer at a time, preventing out-of-order processing or concurrent handling of related messages.

  • Topics

    Why it's wrong here

    Azure Service Bus Topics implement a publish-subscribe pattern, allowing a single message to be sent to multiple independent subscriptions. While each subscription can have its own filtering rules and consumers, messages are not inherently ordered across these different subscriptions. Furthermore, multiple consumers can process the *same* message if they are subscribed to different subscriptions, or multiple consumers can pull from the *same* subscription without guaranteeing FIFO or single-consumer processing for a specific message stream.

  • Dead-letter queue

    Why it's wrong here

    The dead-letter queue (DLQ) is a sub-queue used to hold messages that cannot be delivered to any receiver or processed successfully. Messages are moved to the DLQ due to reasons like exceeding the maximum delivery count, expiration, or explicit rejection by the receiver. Its purpose is for error handling and debugging problematic messages, not for ensuring ordered delivery or single-consumer processing of operational messages within the main message flow.

  • Duplicate detection

    Why it's wrong here

    Azure Service Bus duplicate detection prevents the same message from being processed multiple times within a specified time window. It achieves this by tracking the `MessageId` of sent messages and discarding subsequent messages with the same ID. While crucial for idempotent processing, duplicate detection solely addresses message uniqueness and does not provide any mechanism for enforcing message order (FIFO) or guaranteeing that only a single, specific consumer processes a particular message or a stream of related messages.

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 →

How Courseiva writes practice questions · Editorial policy

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.