Azure Queue 和 Topic 与一个全包含的订阅有何区别?

huangapple go评论44阅读模式
英文:

Difference Azure Queue and Topic with one catch-all Subscription?

问题

在Azure中,如果我创建一个队列或者一个具有一个全捕获订阅的主题,它们之间有什么区别?

简而言之:
我知道后续可以添加更多的订阅,也知道可以对订阅进行过滤,但这不是问题的一部分。
相同之处:都有一个死信队列。
相同之处:每条消息只被处理一次。
区别:?

英文:

If I, in Azure, create a

  • Queue

or

  • Topic with one catch-all Subscription

What is the difference?

TL;DR

I know that one can add more Subscriptions later on, and I know about filtering for the Subscriptions. But that is not part of the question.

Same: There is one dead letter queue.
Same: Each message gets handled once-and-only-once.
Difference: ?

答案1

得分: 1

你正在关注接收部分。真正的区别在于发送端。

  • 当消息发送到队列时,发送方会针对特定目标。这种消息类型通常称为命令。
  • 当消息发布到主题时,它将被零个或多个订阅者接收。这种消息类型通常称为事件。

在命令中,发送方和单个接收方耦合在一起。在事件中,发送方和接收方(们)是解耦的。

英文:

You're focusing on the receiving. The real difference is on the sending side.

  • When a message is sent to a queue, the sender targets a specific destination. This message type is often called a command.
  • When a message is published to a topic, it will be received by zero or more subscribers. This message type is often called an event.

With commands, the sender and the single receiver are coupled. With events, the sender and the receiver(s) are decoupled.

huangapple
  • 本文由 发表于 2023年5月25日 15:20:47
  • 转载请务必保留本文链接:https://go.coder-hub.com/76329771.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定