We have configured network of brokers containing 2 brokers. It seems to work
fine for about a day or so, and then something goes wrong. The system stops
working. Below all the details of the configuration and description of the
problem.

Configuration.
AMQ version: 5.2 SNAPSHOT downloaded and built on Sept 9 2008

Network of brokers contains 2 brokers B1 and B2.

activemq.xml on B1:

....skipped-default-setting-here...

<broker xmlns="http://activemq.apache.org/schema/core";
brokerName="<B1-host-here>" dataDirectory="${activemq.base}/data"> 

....skipped-default-setting-here...

        <networkConnectors>
            <networkConnector name="bridge52"
uri="static://(tcp://<B2-host-here>:61616)" dynamicOnly="true"
networkTTL="2"/>
        </networkConnectors>

....skipped-default-setting-here...

        <transportConnectors>
            <transportConnector name="openwire"
uri="tcp://localhost:61616"/>
            <!-- transportConnector name="openwire"
uri="tcp://localhost:61616" discoveryUri="multicast://default"/ -->
            <!-- transportConnector name="ssl" uri="ssl://localhost:61617"/
-->
            <!-- transportConnector name="stomp"
uri="stomp://localhost:61613"/ -->
            <!-- transportConnector name="xmpp"
uri="xmpp://localhost:61222"/ -->
        </transportConnectors>
</broker>

....skipped-default-setting-here...

activemq.xml on B2:

....skipped-default-setting-here...

<broker xmlns="http://activemq.apache.org/schema/core";
brokerName="<B2-host-here>" dataDirectory="${activemq.base}/data"> 

....skipped-default-setting-here...

        <networkConnectors>
            <networkConnector name="bridge52"
uri="static://(tcp://<B1-host-here>:61616)" dynamicOnly="true"
networkTTL="2"/>
        </networkConnectors>

....skipped-default-setting-here...

        <transportConnectors>
            <transportConnector name="openwire"
uri="tcp://localhost:61616"/>
            <!-- transportConnector name="openwire"
uri="tcp://localhost:61616" discoveryUri="multicast://default"/ -->
            <!-- transportConnector name="ssl" uri="ssl://localhost:61617"/
-->
            <!-- transportConnector name="stomp"
uri="stomp://localhost:61613"/ -->
            <!-- transportConnector name="xmpp"
uri="xmpp://localhost:61222"/ -->
        </transportConnectors>
</broker>

....skipped-default-setting-here...

There are 2 topics and 12 queues are being managed in the brokers, also 2
clients create temporary queues to send messages to a service where replyTo
is being used to reply back to the client.

Our services connect to AMQ brokers using failover://(tcp://<B1-host
here>:61616,tcp://<B2-host here>:61616) 

It seems to prefer the first broker B1 all the time, based on the number of
"Messages Sent" in the AMQ Web Console on B1. So the B2 broker seems to idle
and have 0 Messages Sent for all the queues.

So after about a day of running well, the system stops working at all, and
just "restarting" B2 broker (which usually idles) simply fixes it.
Restarting is in quotes because stopping it by hitting Ctrl-C in the console
(in runs in a screen) takes forever to shutdown the broker. So I just kill
the process with "kill -9" and start it again.

For now I restart B2 broker once a day (stop and start it again which takes
normal time, like few seconds) and everything has been running well for more
than a week now.

It would be great if somebody can point out what is wrong with the
configuration above or if it is a known problem and how to fix it.

Thanks!
-- 
View this message in context: 
http://www.nabble.com/problem-with-network-of-brokers-in-AMQ-5.2-SNAPSHOT-tp19754187p19754187.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.

Reply via email to