Skip to Content

Microsoft AZ-204: Azure Messaging Services: Pub-Sub Model without Constant Polling

Discover two Azure messaging services that enable a publish-subscribe model and eliminate the need for constant polling. Learn how to efficiently handle events and messages in your Azure solutions.

Table of Contents

Question

You are developing a solution that will use Azure messaging services.

You need to ensure that the solution uses a publish-subscribe model and eliminates the need for constant polling.

What are two possible ways to achieve the goal? Each correct answer presents a complete solution.
NOTE: Each correct selection is worth one point.

A. Service Bus
B. Event Hub
C. Event Grid
D. Queue

Answer

To ensure that your solution uses a publish-subscribe model and eliminates the need for constant polling, you can utilize two Azure messaging services:

A. Service Bus
C. Event Grid

Explanation

It is strongly recommended to use available messaging products and services that support a publish-subscribe model, rather than building your own. In Azure, consider using Service Bus or Event Grid. Other technologies that can be used for pub/sub messaging include Redis, RabbitMQ, and Apache Kafka.

Azure Service Bus is a fully managed enterprise message broker that supports a publish-subscribe model. It allows publishers to send messages to topics, and subscribers can create subscriptions to receive messages from those topics based on specific criteria. Service Bus enables decoupled communication between publishers and subscribers, eliminating the need for constant polling.

Key features of Service Bus:

  • Supports publish-subscribe messaging pattern
  • Enables decoupled communication between publishers and subscribers
  • Provides message filtering and routing based on subscriptions
  • Offers features like message sessions, dead-lettering, and duplicate detection

Azure Event Grid is a fully managed event routing service that follows a publish-subscribe model. It allows you to react to events from various Azure services and custom sources. Event Grid uses a push-based delivery mechanism, where subscribers receive events as they occur, eliminating the need for constant polling.

Key features of Event Grid:

  • Supports publish-subscribe event delivery
  • Integrates with various Azure services and custom event sources
  • Provides event filtering and routing based on event types and subscriptions
  • Offers reliable event delivery and built-in retry mechanisms

Both Service Bus and Event Grid are suitable choices for implementing a publish-subscribe model in your solution. They provide efficient event and message handling, enabling real-time communication and eliminating the need for constant polling.

Event Hub and Queue are not the best fit for this scenario because:

  • Event Hub is primarily designed for high-throughput ingestion of events and does not natively support a publish-subscribe model.
  • Queue follows a point-to-point messaging pattern and does not provide the publish-subscribe functionality required for the given scenario.

By leveraging either Azure Service Bus or Azure Event Grid, you can achieve your goal of using a publish-subscribe model and eliminating the need for constant polling in your solution.

Microsoft AZ-204 certification exam practice question and answer (Q&A) dump with detail explanation and reference available free, helpful to pass the Microsoft AZ-204 exam and earn Microsoft AZ-204 certification.