考题解析 | 使用 Azure 服务总线队列主题和订阅


  题目

You are developing an application that will use a message-based delivery system. You have the following requirements:
Support for multiple destinations that receive their own copy of each message in a queue-like manner. Stores up to 60-GB of messages.
Which messaging solution should you use?
Select only one answer.
A. Azure Functions
B. Azure Queue Storage
C. Azure Service Bus queues
D. Azure Service Bus queues with topics

  参考答案

D

  参考解析

技巧:排除明显错误选项,在没有明显错误的选项中选择最合理的选项。
客户正在开发一个基于消息传递系统的应用程序,需要满足以下两个要求,支持多个目的地,每个目的地以队列方式接收消息的副本,能够存储最多60GB的消息。

A. 不正确。Azure Functions 是一个事件驱动的计算服务,用于运行小块的代码(“函数”)响应各种事件。不提供消息存储或队列系统的服务。
B. 不正确。Azure Queue Storage 提供了一个简单的消息队列服务,用于在应用程序组件之间进行云消息传递。它不支持将消息的副本发送到多个目的地(即没有发布/订阅模式)。
C. 不正确。Azure Service Bus queues 提供了一个企业级的消息队列服务,支持复杂的消息传递模式,包括事务、消息会话和死信队列等。它跟 Azure Queue Storage 一样,它主要支持点到点的消息传递,而不是发布/订阅模式,不直接支持将消息发送到多个目的地。
D. 正确。Azure Service Bus topics 和 subscriptions 提供了一个发布/订阅消息传递模式。在这个模式下,发布者发送消息到一个主题,而订阅者则接收该主题的副本。这满足了将消息发送到多个目的地的要求。此外,Azure Service Bus 设计用于处理企业级的工作负载,其存储容量和性能可以满足存储最多60GB消息的需求。