具有ActiveMQ经纪人网络的JMS消费者

问题描述:

我在Broker集群的ActiveMQ网络上有一个JMS主题(又名分布式主题)。我有一个外部JMS使用者(Weblogic门户网站)需要订阅此主题并获取发送给它的所有消息(跨所有经纪人)。

I have a JMS topic on an ActiveMQ network of brokers cluster (aka distributed topic). I have an external JMS consumer (Weblogic portal) that needs to subscribe to this topic and get all the messages sent to it (across all brokers).

如果消费者订阅对于其中一个经纪人的主题,它只会得到经纪人收到的消息子集,对吗?

If the consumer subscribes to the topic on one of the brokers, it will only get the subset of the messages that the broker receives, correct?

我想我可以为每个代理创建一个消费者并将消息聚合在一起,但是我也处理连接问题并需要知道哪个经纪人可用,等等。

I guess I could create a consumer for each broker and aggregate the messages together, but then I'm also on the hook for dealing with connection issues and needing to know which brokers are available, etc.

问题,是否有办法配置经纪人或消费者网络以从分布式JMS主题获取所有消息?

Question, is there a way to configure the network of brokers or consumer to get all the messages from a distributed JMS topic?


如果消费者在其中一个经纪人上订阅了
主题,那么它将是
只获得经纪人收到的消息
的子集,对吗?

If the consumer subscribes to the topic on one of the brokers, it will only get the subset of the messages that the broker receives, correct?

技术上,是的,但经纪人网络负责了解哪些消费者对哪些消息感兴趣,并确保正确的经纪人获得正确的消息。

Technically, yes, but the broker network is responsible for knowing which consumers are interested in which messages, and making sure that the right brokers get the right messages.

通常,这意味着每个代理都会获取所有消息,但如果代理只有消费者具有给定的消息选择器,那么它只会获得这些客户感兴趣的消息。 。

Normally, this means that every broker gets every message, but if a broker only has consumers with a given message selector, it will only get messages that those clients are interested in.

实际上,这意味着您选择一个经纪人,连接到它,然后让经纪人网络在它们之间进行排序。从理论上讲。

In practise, this means you pick a broker, connect to it, and let the broker network sort it out amongst themselves. In theory.