activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From crgr <>
Subject ActiveMQ over different subnets
Date Fri, 19 Mar 2010 16:05:06 GMT


I am trying to make an ActiveMQ network of brokers work over different
subnetworks. Inside the subnetworks I use multicast for auto discovery
between the brokers, but this isn't an option for connecting  brokers in
different subnets. The requirements are that each subnet can have publishers
and subscribers and that subscribers can subscribe to topics produced in a a
different subnet. I am not concerned with queues at the moment. To provide
communication across subnets, in each subnet, I use two special brokers that
are supporting the communication with the other subnet. One broker is just
for receiving and the other is just for sending.
The configuration for the brokers is like this:

1. Broker inside each subnet:

    dynamicOnly = "true" 
    prefetchSize = "1" />		
    name = "toOutside"
    duplex = "false"
    dynamicOnly = "false"
    networkTTL = "1"/>
    name = "fromOutside"
    duplex = "true"
    dynamicOnly = "false"
    networkTTL = "3">
     <topic physicalName = "MyTopic" />
discoveryUri="multicast://default" />		

2. Broker that is sending to the other subnetwork(OutHost):

      duplex = "false"
      dynamicOnly = "false"
      networkTTL = "2"/>
uri="tcp://" />	

3.Broker that is receiving from the other subnetwork(InHost):


    <transportConnector name="Subnet"
uri="tcp://" />	
    <transportConnector name="Outside" uri="tcp://
transport.keepAliveResponseRequired=true" />	

I've run some tests with 2 subnetworks, 2 non-special brokers on each
subnetwork and 2 clients on each broker. One of these clients publishes on
its own topic and the other client subscribes to all four topics. All the
brokers are configured with the persistent attribute set to false and all
consumers are not durable.  
There are several problems that I cannot figure out. 

1.Unless I start clients that subscribe to the topics on OutHost for subnet1
and on InHost for subnet2 messages are not passing from subnet1 to subnet2,
and vice versa. 
As long as the chain of connections between a inner broker on subnet1 and a
inner broker on subnet2 contains only connections with dynamicOnly set to
false shouldn't this not happen? 
2.Sometimes I am receiving duplicate messages on the final clients(those on
the brokers inside the subnets) or sometimes messages on this clients are
missing. The duplicated messages are coming from the other subnet.

Maybe my broker topology is too complicated and all I want to achieve can be
done in a simpler way. Any advice would be very helpful.


View this message in context:
Sent from the ActiveMQ - User mailing list archive at

View raw message