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.

Reply via email to