简体   繁体   English

使用代理的ActiveMQ网络减少具有分布式主题的网络跃点

[英]Reducing network hops with a distributed topic with ActiveMQ network of brokers

Lets say I have a network of brokers which share a topic on which orders are published. 可以说,我有一个经纪人网络,他们共享一个发布订单的主题。 I have two brokers one in location A and one in location B. 我有两个经纪人,一个在位置A,另一个在位置B。

One of the consumers of the topic is also located in location A and is configured to connect to broker A. Both the brokers publish orders on the topic and the consumer will receive all the orders published by the two brokers. 主题的使用者之一也位于位置A,并且配置为连接到经纪人A。经纪人均发布有关该主题的订单,而使用者将收到两个经纪人发布的所有订单。

As I understand the orders published by broker in location B will internally be passed to broker in location A by ActiveMQ and from there will be published to the consumer in location A. 据我了解,ActiveMQ将在位置B的经纪人内部发布的订单内部传递给位置A的经纪人,并从那里将其发布到位置A的消费者。

Is there an easy way to publish the order from broker B directly to the consumers in location A? 是否有一种简单的方法可以将经纪人B的订单直接发布到位置A的消费者?

Yes - don't use a network of brokers; 是的-不要使用经纪人网络; what you're describing is how that works (and is designed to work). 您要描述的是它是如何工作的(并且旨在工作)。

If you don't want that, instead have the consumer connect to all brokers directly and don't set them up as a network / cluster. 如果您不希望这样做,请让使用者直接连接到所有代理,不要将它们设置为网络/群集。

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

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