ActiveMQ:基于简单主题的集群

发布于 2024-09-06 16:19:04 字数 508 浏览 2 评论 0原文

好吧,假设我正在构建基于 ActiveMQ 的聊天应用程序。这很简单。只有一个 QUEUE.IN 和一个 TOPIC.OUT。所有消息都直接从 QUEUE.IN 路由到 TOPIC.OUT。客户端将聊天消息生成到 QUEUE.IN 并从 TOPIC.OUT 进行消费。就这样。

现在,我想把它聚类。不需要复杂的东西。只需运行几个其他相同的节点(A..N)。基本上,订阅 A 节点的客户端将消息发送到 A.QUEUE.IN。此消息必须出现在所有其他节点 (A..N).TOPIC.OUT 上。这可以通过简单的骆驼路由轻松完成,该路由将所有来自 TOPIC.OUT 的消息重新路由到其他节点,但是有一些很好的 ActiveMQ 原生方法可以做到这一点吗?喜欢在多个 AMQ 实例之间共享某些队列/主题吗?

Well, lets say I'm building ActiveMQ based chat application. It's pretty simple. Having only one QUEUE.IN and one TOPIC.OUT. All messages are simply routed right away from QUEUE.IN to TOPIC.OUT. Clients are producing their chat messages to QUEUE.IN and consuming from TOPIC.OUT. That's all.

Now, I wanna cluster it. Don't need something complex. Just run few other identical nodes (A..N). Basically, client, subscribed to A node, sends message to A.QUEUE.IN. This message must then appear on all other nodes (A..N).TOPIC.OUT. This could be easily done by simple camel route that re-route all messages comes to TOPIC.OUT to other nodes, but is there some nice ActiveMQ-native way to do so? Like some queue/topic shared among several AMQ instances?

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

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

发布评论

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

评论(2

一抹苦笑 2024-09-13 16:19:04

您可以使用虚拟目标将消息转发到 activemq 中的多个端点。

http://activemq.apache.org/virtual-destinations.html

You can forward messages to multiple endpoints in activemq using virtual destinations.

http://activemq.apache.org/virtual-destinations.html

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