You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Sri <sr...@googlemail.com> on 2010/08/05 19:55:35 UTC

Consumers need to restart when ActivemQ restarts

Hello,

I am using Actvie MQ for the messaging and there are two consumers for this
ActiveMQ. 

When the Active MQ is down or if I restart the ActiveMQ , I have to restart
the consumers as well . is there any way that I can handle , ie when
ActiveMQ restarts , the consumer should automatically consume the messages
with out restarting it.

Thanks in advance.

Regards
Sri
-- 
View this message in context: http://camel.465427.n5.nabble.com/Consumers-need-to-restart-when-ActivemQ-restarts-tp2265729p2265729.html
Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.

Re: Consumers need to restart when ActivemQ restarts

Posted by Sri <sr...@googlemail.com>.
I have used the failover and It worked but when I am using this with the 
prefetchPolicy the consumer is not starteda and the routes are not started.  

following is the full borker url I have used 

failover:(tcp://dev01.sportingstatz.com:61616?jms.prefetchPolicy.queuePrefetch=0&wireFormat.maxInactivityDuration=0)&timeout=-1



Here is the log when we start the consumer 

2010-08-06 13:50:26,705 [main] INFO 
org.springframework.context.support.FileSystemXmlApplicationContext  -
Refreshing
org.springframework.context.support.FileSystemXmlApplicationContext@1bd2664:
startup date [Fri Aug 06 13:50:26 BST 2010]; root of context hierarchy
2010-08-06 13:50:26,799 [main] INFO 
org.springframework.beans.factory.xml.XmlBeanDefinitionReader  - Loading XML
bean definitions from file
[C:\ProjectRepo\valde_latest\cif\trunk\spring-config.xml]
2010-08-06 13:50:26,986 [main] INFO 
org.springframework.beans.factory.support.DefaultListableBeanFactory  -
Pre-instantiating singletons in
org.springframework.beans.factory.support.DefaultListableBeanFactory@2acc65:
defining beans [activemq,activemq1,webspheremq,socketFactory,myRetryBean];
root of factory hierarchy
2010-08-06 13:50:27,767 [main] DEBUG
com.opta.delivery.ssl.OptaSSLSocketFactory  - JSSE is installed correctly!
2010-08-06 13:50:28,189 [main] INFO 
org.apache.camel.impl.DefaultCamelContext  - JMX enabled. Using
ManagedManagementStrategy.
2010-08-06 13:50:28,221 [main] DEBUG
com.opta.delivery.FeedNotificationProcessor  - feedserviceuri:
http://dev01.sportingstatz.com:8080/dove/feed
2010-08-06 13:50:28,392 [main] DEBUG
com.opta.delivery.RecipientAggregationStrategy  - New
RecipientAggregationStrategy created
2010-08-06 13:50:28,486 [main] INFO 
org.apache.camel.impl.DefaultCamelContext  - Apache Camel 2.4.0
(CamelContext: camel-1) is starting
2010-08-06 13:50:29,158 [main] INFO 
org.apache.camel.impl.converter.AnnotationTypeConverterLoader  - Found 8
packages with 18 @Converter classes to load
2010-08-06 13:50:29,221 [main] INFO 
org.apache.camel.impl.converter.DefaultTypeConverter  - Loaded 159 type
converters in 0.547 seconds





-- 
View this message in context: http://camel.465427.n5.nabble.com/Consumers-need-to-restart-when-ActivemQ-restarts-tp2265729p2266611.html
Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.

Re: Consumers need to restart when ActivemQ restarts

Posted by Claus Ibsen <cl...@gmail.com>.
On Thu, Aug 5, 2010 at 7:55 PM, Sri <sr...@googlemail.com> wrote:
>
> Hello,
>
> I am using Actvie MQ for the messaging and there are two consumers for this
> ActiveMQ.
>
> When the Active MQ is down or if I restart the ActiveMQ , I have to restart
> the consumers as well . is there any way that I can handle , ie when
> ActiveMQ restarts , the consumer should automatically consume the messages
> with out restarting it.
>

The is a failover support on the JMS consumer.
http://activemq.apache.org/failover-transport-reference.html



> Thanks in advance.
>
> Regards
> Sri
> --
> View this message in context: http://camel.465427.n5.nabble.com/Consumers-need-to-restart-when-ActivemQ-restarts-tp2265729p2265729.html
> Sent from the Camel - Users (activemq) mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
Apache Camel Committer

Author of Camel in Action: http://www.manning.com/ibsen/
Open Source Integration: http://fusesource.com
Blog: http://davsclaus.blogspot.com/
Twitter: http://twitter.com/davsclaus