camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: activemq component MaxConnection retry
Date Wed, 28 Apr 2010 10:49:09 GMT
Hi

I think you can put it in the brokerURL as a uri parameter as shown here
http://camel.apache.org/activemq.html



On Wed, Apr 28, 2010 at 11:35 AM, ssenth <seshanmugham@eur.ko.com> wrote:
>
> Hi,
> I am using the below route to put the message in an ActiveMQ queue
>
> Bean Declaration        <bean id="activemq"
> class="org.apache.activemq.camel.component.ActiveMQComponent">
>                <property name="connectionFactory">
>                        <bean class="org.apache.activemq.ActiveMQConnectionFactory"/>
>                </property>
>        </bean>
>
> Routing
>        <route>
>                <from uri="customComponent:Partner2"/>
>                <to uri="activemq:queue:TargetQueue"/>
>        </route>
>
> I did send two messages which reached the TargetQueue in ActiveMQ, but when
> I stopped the activemq and send the third message, CAMLE did not time
> out/stop instead it continuously tries to reconnect to ActiveMQ. Can any one
> let me know how or hing on how to configure the route to stop the CAMEL
> context after let's say 3 reconnect attempts and backup the message to a
> folder.
>
> Did find maxReconnectAttempts and startupMaxReconnectAttempts in
> org.apache.activemq.transport.failover.FailoverTransport , but could not
> figure out how to set these properties.
>
>
> Below is the log4jenties
>
> Time: 2:24:32 PM  Priority: DEBUG  Thread: ActiveMQ Task  NDC: null
> Category: org.apache.activemq.transport.failover.FailoverTransport Location:
> org.apache.activemq.transport.failover.FailoverTransport.doReconnect(FailoverTransport.java:722)
> Message:
> Connect fail to: tcp://localhost:61616, reason: java.net.ConnectException:
> Connection refused: connect
> Throwable:
> null
>
> Time: 2:24:32 PM  Priority: DEBUG  Thread: ActiveMQ Task  NDC: null
> Category: org.apache.activemq.transport.failover.FailoverTransport Location:
> org.apache.activemq.transport.failover.FailoverTransport.doReconnect(FailoverTransport.java:756)
> Message:
> Waiting 30000 ms before attempting connection.
> Throwable:
> null
>
> Time: 2:24:32 PM  Priority: DEBUG  Thread: main  NDC: null Category:
> org.apache.activemq.transport.failover.FailoverTransport Location:
> org.apache.activemq.transport.failover.FailoverTransport.oneway(FailoverTransport.java:406)
> Message:
> Waiting for transport to reconnect.
> Throwable:
> null
> --
> View this message in context: http://old.nabble.com/activemq-component-MaxConnection-retry-tp28386612p28386612.html
> Sent from the Camel - Users 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

Mime
View raw message