AZ-204 Practice Question: Connect to and consume Azure services and third-party services
Which TWO services can be used to implement a publish-subscribe messaging pattern in Azure?
⚠ Common exam trap
Candidates often confuse Azure Storage Queues (point-to-point) with Service Bus Topics (pub-sub) because both are 'queues' in name, but only topics support multiple independent subscribers receiving the same message.
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
✓
Azure Service Bus Topics
Azure Service Bus Topics (C) implement publish-subscribe natively: a topic receives messages from publishers and fans them out to multiple subscriptions, each of which can have filters/rules, so multiple independent subscribers each get a copy. Azure Event Grid (D) is also a publish-subscribe service, using topics and event subscriptions to push events to multiple handlers via a push delivery model. Azure Storage Queues (A) and Azure Queue Storage (E) are the same point-to-point queue service, where each message is consumed by only one receiver, so they do not provide pub-sub fan-out. Azure Event Hubs (B) is a streaming/event-ingestion service using partitions and consumer groups; while multiple consumers can read the stream, it is not a true publish-subscribe topic/subscription pattern with per-subscriber filtering like Service Bus Topics or Event Grid.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Azure Storage Queues
Why it's wrong here
Azure Storage Queues are designed for simple, asynchronous point-to-point messaging between components. Each message placed into a Storage Queue is typically processed by a single consumer, which then deletes the message. This first-in, first-out (FIFO) delivery model, where messages are not broadcast to multiple independent subscribers, fundamentally differs from a publish-subscribe pattern. Therefore, they do not natively support multiple subscribers receiving the same message.
- ✗
Azure Event Hubs
Why it's wrong here
Azure Event Hubs is a highly scalable data streaming platform and event ingestion service, optimized for capturing millions of events per second from diverse sources. While it allows multiple consumer groups to read from the same stream, each consumer group processes a distinct partition of the stream, and the primary use case is for real-time analytics and stream processing, not for broadcasting discrete messages to independent subscribers who each receive their own copy. It lacks the explicit topic-subscription model inherent to pub-sub.
- ✓
Azure Service Bus Topics
Why this is correct
Azure Service Bus Topics are a core component for implementing the publish-subscribe pattern within Azure. Publishers send messages to a topic, and these messages are then delivered to one or more named subscriptions associated with that topic. Each subscription can have filtering rules, allowing subscribers to receive only a subset of messages, ensuring that multiple independent consumers can each receive their own copy of relevant messages from a single published source.
- ✓
Azure Event Grid
Why this is correct
Azure Event Grid is a fully managed event routing service that enables reactive, event-driven architectures by facilitating the publish-subscribe pattern. It allows you to subscribe to events from various Azure services and custom sources, then route those events to different handlers. Event Grid delivers events reliably to multiple subscribers, ensuring each interested party receives a copy of the event, making it ideal for building responsive, decoupled applications.
- ✗
Azure Queue Storage
Why it's wrong here
Azure Queue Storage provides a robust, persistent messaging solution primarily for point-to-point communication between application components. Messages are stored in a queue and are typically consumed by a single worker instance, which then removes the message. This design ensures that each message is processed exactly once by a specific consumer, which is fundamentally incompatible with the publish-subscribe model where a single message is intended for multiple, independent subscribers.
Go deeper
Related to this question
Learn chapter
Azure App Configuration Service
Key term
Azure Event Grid
Azure Event Grid is a fully managed event routing service that allows applications and services to react to events in real time using a publish-subscribe model.
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.
About these practice questions
One of 883 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.