集群应用程序服务器中的 JMS 主题订阅者如何接收消息?

发布于 2024-08-16 17:05:25 字数 428 浏览 3 评论 0原文

假设我创建了一个带有一个订阅者 (PropertiesSubscriber) 的 JMS 主题 (PropertiesTopic)。 PropertiesSubscriber 运行在负载平衡的应用程序服务器集群中,如下图所示。

替代文本 http://www.freeimagehosting.net/uploads/be28c03781.png

何时如果消息传递到 PropertiesTopic,则在不同应用程序服务器上运行的所有 PropertiesSubscriber 实例是否都会获取该消息,或者该消息是否仅传递到在负载均衡器确定的应用程序服务器上运行的一个 PropertiesSubscriber 实例?

Suppose I created a JMS Topic (PropertiesTopic) with one subscriber (PropertiesSubscriber). PropertiesSubscriber is running in a load balanced application server cluster as shown in the picture below.

alt text http://www.freeimagehosting.net/uploads/be28c03781.png

When a message is delivered to PropertiesTopic, do all the instances of PropertiesSubscriber running on different app servers get that message or does the message get delivered to only one PropertiesSubscriber instance running on an app server determined by the load balancer?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

暮凉 2024-08-23 17:05:26

在不同应用服务器上运行的所有 PropertiesSubscriber 实例收到该消息。即使同一应用程序服务器上有多个针对该主题的侦听器,所有侦听器都会收到消息。

All the instances of PropertiesSubscriber running on different app servers WILL get that message. Even if there are multiple listeners on the same app server for the topic, all the listeners will get the message.

少女的英雄梦 2024-08-23 17:05:25

JMS 2.0 引入共享订阅。这些允许多个消费者(例如:在集群的不同节点上)共享单个主题订阅。只有一个共享订阅的消费者才会收到每条消息。

要将多个使用者指定为共享订阅,他们需要使用 相同的共享订阅名称

JMS 2.0 introduces shared subscriptions. These allow multiple consumers (ex: on different nodes of a cluster) to share a single Topic subscription. Only one of the consumers sharing a subscription will get each message.

To designate multiple consumers as sharing a subscription, they need to use the same sharedSubscriptionName

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文