You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by Lani Lim <ll...@central1.com> on 2016/09/26 22:35:03 UTC

ActiveMQ multiple datacentre and multiple apps

We have 2 data centres with 2 brokers on each side. 

Producers and consumers are initiated by different applications as well,
application also are deployed in the same 2 data centres but in different
servers, given this we also have added the priorityURI and priorityBackup
since order is important for us, application that produce or consume
messages needs to be processed in the same side and shouldn't change on a
regular basis. 


Broker config:

Option 1:
<networkConnector
uri="static:(tcp://DC1_B:6${activemq.port}6,tcp://DC2_A:6${activemq.port}6,tcp://DC2_B:6${activemq.port}6)"
name="cluster" networkTTL="3" decreaseNetworkConsumerPriority="true"
suppressDuplicateQueueSubscriptions="true" dynamicOnly="true"/>

Option 2:
<networkConnector uri="static:(tcp://DC1_B:6${activemq.port}6)"
name="cluster" networkTTL="3" suppressDuplicateQueueSubscriptions="true"
dynamicOnly="true"> </networkConnector>
<networkConnector
uri="static:(tcp://DC2_A:6${activemq.port}6,tcp://DC2_B:6${activemq.port}6)"
name="cluster2" networkTTL="3" suppressDuplicateQueueSubscriptions="true"
dynamicOnly="true" decreaseNetworkConsumerPriority="true">
</networkConnector>

Does the decreaseNetworkConsumerPriority matter in this case? 
The brokers producers and consumers start ups are all unpredictable, so we
just need it to go the same data centre. 



--
View this message in context: http://activemq.2283324.n4.nabble.com/ActiveMQ-multiple-datacentre-and-multiple-apps-tp4716969.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Re: ActiveMQ multiple datacentre and multiple apps

Posted by Tim Bain <tb...@alumni.duke.edu>.
I think you'll get the behavior you want with Option 2, but only if there
aren't enough pending messages to fill the dispatch queues of each
connected consumer within the data center, with additional messages left
over.  If the consumers' dispatch queues are full (or if there are no
connected consumers on that data center) and there are still more pending
messages, ActiveMQ will start shipping them to the other data center.

If your application's correct behavior depends on localized consumption,
why network the two data centers at all?  It seems like you get pain with
no gain when using that configuration.

Tim

On Mon, Sep 26, 2016 at 4:35 PM, Lani Lim <ll...@central1.com> wrote:

> We have 2 data centres with 2 brokers on each side.
>
> Producers and consumers are initiated by different applications as well,
> application also are deployed in the same 2 data centres but in different
> servers, given this we also have added the priorityURI and priorityBackup
> since order is important for us, application that produce or consume
> messages needs to be processed in the same side and shouldn't change on a
> regular basis.
>
>
> Broker config:
>
> Option 1:
> <networkConnector
> uri="static:(tcp://DC1_B:6${activemq.port}6,tcp://DC2_A:6$
> {activemq.port}6,tcp://DC2_B:6${activemq.port}6)"
> name="cluster" networkTTL="3" decreaseNetworkConsumerPriority="true"
> suppressDuplicateQueueSubscriptions="true" dynamicOnly="true"/>
>
> Option 2:
> <networkConnector uri="static:(tcp://DC1_B:6${activemq.port}6)"
> name="cluster" networkTTL="3" suppressDuplicateQueueSubscriptions="true"
> dynamicOnly="true"> </networkConnector>
> <networkConnector
> uri="static:(tcp://DC2_A:6${activemq.port}6,tcp://DC2_B:6$
> {activemq.port}6)"
> name="cluster2" networkTTL="3" suppressDuplicateQueueSubscriptions="true"
> dynamicOnly="true" decreaseNetworkConsumerPriority="true">
> </networkConnector>
>
> Does the decreaseNetworkConsumerPriority matter in this case?
> The brokers producers and consumers start ups are all unpredictable, so we
> just need it to go the same data centre.
>
>
>
> --
> View this message in context: http://activemq.2283324.n4.
> nabble.com/ActiveMQ-multiple-datacentre-and-multiple-apps-tp4716969.html
> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>