简体   繁体   English

Azure Service Bus主题和多实例订阅者

[英]Azure Service Bus Topics and Multiple Instance Subcriber

This is a general question about Microsoft.Azure.ServiceBus . 这是有关Microsoft.Azure.ServiceBus的一般问题。 In Azure, when an application is scaled up, how does Azure handle dispatching messages to a subscriber if that subscriber has been scaled up multiple times. 在Azure中,当应用程序按比例放大时,如果该订阅者已多次按比例放大,Azure如何处理向该订阅者分发消息。 Figure 1 shows a typical situation, Figure 2 shows the scenario I am talking about: 图1显示了一种典型情况, 图2显示了我正在谈论的场景:

在此处输入图片说明

By default, does Azure send the same messages to all instances? 默认情况下,Azure是否将相同的消息发送到所有实例? Or is Azure "smart" enough to load balance the messages between instances? 还是Azure“智能”足以在实例之间负载均衡消息? If not, how do people handle this situation normally? 如果没有,人们如何正常处理这种情况? I only want one instance to receive this message in the case it's scaled. 我只希望一个实例在缩放的情况下接收此消息。

Azure Service Bus is going to to send a copy of the published message to all the subscribers . Azure服务总线将向所有订阅者发送已发布消息的副本。

If you scaled out subscriber using the same subscription entity, then you've got a completing consumer sceanrio where a message arriving to the subscription will be handled by a single subscriber instance. 如果您使用相同的订阅实体扩展订户,那么您将获得完整的消费者信息,其中到达订阅的消息将由单个订户实例处理。 That is assuming processing doesn't fail and message is completed. 这是假设处理不会失败并且消息已完成。 Otherwise message will be handled again by another instance. 否则,消息将由另一个实例再次处理。

The first scenario is going to work when each instance of the subscriber is listening to a different physical subscription . 当订阅者的每个实例都在侦听不同的物理订阅时,第一种情况将起作用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM