简体   繁体   English

经纪人网络中的ActiveMQ JMS持久主题

[英]ActiveMQ JMS Durable Topic in a Network of Brokers

Say you have BrokerA and BrokerB connected to each other in the "Network of Brokers" Pattern. 假设您在“经纪人网络”模式中将BrokerA和BrokerB相互连接。 You have ClientZ connect to BrokerA and create a durable subscription to TopicT. 您有ClientZ连接到BrokerA并创建一个持久的TopicT订阅。 That client disconnects for 15 mins from BrokerA, then reconnects to BrokerB. 该客户端与BrokerA断开15分钟,然后重新连接到BrokerB。

Will all the messages it missed in those 15 mins be consumed even though it's now on BrokerB? 即使它现在在BrokerB上,它们在15分钟内丢失的所有消息都会被消耗吗?

Will any messages remain on BrokerA? BrokerA上会留下任何消息吗?

That's a very interesting question, but the concept of a "Network of Brokers" is not, as far as I know, part of the JMS API standard. 这是一个非常有趣的问题,但据我所知,“经纪人网络”的概念并不是JMS API标准的一部分。 Therefore, there is no general answer to your question. 因此,您的问题没有一般性的答案。

However, I see you have "activemq" in your question tags, and Apache ActiveMQ is a JMS provider implementation that does support "Network of Brokers". 但是,我看到你在你的问题标签有“ActiveMQ的”,和Apache ActiveMQ是一个JMS提供者的实现, 支持“经纪人的网络”。 So if you are using ActiveMQ, you may be able to find an answer in their documentation, which implies that to do what you want you should create a "virtual destination". 因此,如果您使用ActiveMQ,您可以在他们的文档中找到答案,这意味着要做您想做的事情,您应该创建一个“虚拟目的地”。 See the following documentation: http://activemq.apache.org/how-do-i-use-durable-subscribers-in-a-network-of-brokers.html 请参阅以下文档: http//activemq.apache.org/how-do-i-use-durable-subscribers-in-a-network-of-brokers.html

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

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