Hi, You don’t need to let the Slave run when the Master is in charge. I think you can take a look at the camel-zookeeper[1].
[1]http://camel.apache.org/zookeeper.html#Zookeeper-ZooKeeperenabledRoutepolicy. -- Willem Jiang Red Hat, Inc. Web: http://www.redhat.com Blog: http://willemjiang.blogspot.com(http://willemjiang.blogspot.com/) (English) http://jnn.iteye.com(http://jnn.javaeye.com/) (Chinese) Twitter: willemjiang Weibo: 姜宁willem On December 31, 2013 at 9:45:04 AM, Preethi (preethi.krishna...@gmail.com) wrote: > > Hi > > We are trying to setup Master slave for ActiveMQ using camel-context. > Our > current architecture is like this. > > > 1. A camel route which subscribes to MQ topics (these MQ topics > are IBM > topics). > 2. This camel route then takes the message from the topic and transforms > it > 3. The transformed message is saved in the database. > > I have been trying to setup master slave but have not been successful > so > far. This is what I'm doing > > A.An instance of this application deployed on tomcat. > B.The slave is just another instance of this same application.Please > note > that the clientids and the subscriber names are the same on both > these > instances. Hence the slave would give the following exception > , which is > expected. > > Cause: JMSWMQ0026: Failed to subscribe to topic '#/#/ITEM/MAINT' > using > MQSUB.; nested exception is com.ibm.mq.MQException: JMSCMQ0001: > WebSphere MQ > call failed with compcode '2' ('MQCC_FAILED') reason '2429' > ('MQRC_SUBSCRIPTION_IN_USE'). > > > We are using the default KahaDBPersistenceAdapter . The issue > here is that > the slave container runs for few hours and just dies due to insufficient > java heap space. > I was trying to configure the kahadb adapter to not poll every > 2-3 seconds , > which it seems to be doing , but haven't been successful so far. > > How do I configure the kahadb to poll during longer intervals > (say 5 mins)? > Or are there any more options other than the kahadb for this Master > Slave > setup? > > > > -- > View this message in context: > http://camel.465427.n5.nabble.com/Master-Slave-Camel-ActiveMQ-tp5745360.html > Sent from the Camel - Users mailing list archive at Nabble.com. >