You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@activemq.apache.org by dege <de...@pointclickcare.com> on 2007/02/05 19:41:15 UTC

Failover not working with distributed queue

I have applications A and B running in two different instances of Resin. 
Each has a broker.
Application A puts messages onto a distributed queue and application B
consumes the messages using message driven pojo's.  Both are configured
using Spring 2.0

What we've found is that when we stop Application B and then start it up
again(which starts up its broker)
messages no longer get through until I restart application A.

Our network connector config for broker in application A was as follows:

<amq:networkConnectors>
    <amq:networkConnector uri="static://(tcp://url-of-broker-in-app-B)"
failover="true"
         name="NotificationsBridge"
         dynamicOnly="false"
         conduitSubscriptions="true"
         decreaseNetworkConsumerPriority="false">
    </amq:networkConnector>
</amq:networkConnectors>

Then i saw this posting
http://www.nabble.com/Disconnection-and-reconnection-in-a-network-of-brokers-tf2704774.html#a7582937
so I tried changing  failover to false
<amq:networkConnectors>
    <amq:networkConnector uri="static://(tcp://url-of-broker-in-app-B)"
failover="false"
         name="NotificationsBridge"
         dynamicOnly="false"
         conduitSubscriptions="true"
         decreaseNetworkConsumerPriority="false">
    </amq:networkConnector>
</amq:networkConnectors>

And amazingly this did the trick.  Now if I application B goes down for a
time and application A continues to put message on the queue and then
application B comes back up the two brokers synch up as expected.  

In the thread listed above they talk about potentially reporting this issue
as a bug.  Is this a known issue?  I haven't found anything yet.  Any ideas
why this might be happening?
-- 
View this message in context: http://www.nabble.com/Failover-not-working-with-distributed-queue-tf3176112.html#a8812231
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Failover not working with distributed queue

Posted by dege <de...@pointclickcare.com>.
Just as a follow up, setting the failover to false results in an out of
memory error quite quickly if where you are bridging to is not up.
in the log i see

09/02/2007 17:16:58.880 [Thread-23] INFO  Establishing network connection
between from vm://pccapp?network=true to tcp://localhost:62001

09/02/2007 17:16:59.868 [Thread-23] WARN  Could not start network bridge
between: vm://pccapp?network=true and: tcp://localhost:62001
over and over again when the target is not up, each time with a different
thread id.
Memory consumption continues to climb and climb until it eventually throws
an out of memory error.  This is without any other activity in the app.  
Resetting failover to true fixes the issue but then we're back to the local
and remote brokers not synching up if the remote broker goes down for a
period.
-- 
View this message in context: http://www.nabble.com/Failover-not-working-with-distributed-queue-tf3176112s2354.html#a8894638
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Re: Failover not working with distributed queue

Posted by dege <de...@pointclickcare.com>.
Found the following open issue which is exactly the behaviour I'm getting.

http://issues.apache.org/activemq/browse/AMQ-870
-- 
View this message in context: http://www.nabble.com/Failover-not-working-with-distributed-queue-tf3176112s2354.html#a8908082
Sent from the ActiveMQ - User mailing list archive at Nabble.com.