You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by mtod09 <mt...@thetods.net> on 2015/12/29 00:27:04 UTC

suppress error from Camel Route on slave

I'm running ActiveMQ 5.13 on a leveldb cluster. 
My ActiveMQ.xml config contains a Camel route in an include file. 

        <import resource="ESBRoute1.xml"/>

I route xml from one queue to a topic but when slave is in standby mode I
keep getting this error : 

INFO   | jvm 1    | 2015/12/28 18:10:26 | ERROR | Could not refresh JMS
Connection for destination 'esb.*' - retrying using
FixedBackOff{interval=5000, currentAttempts=181, maxAttempts=unlimited}.
Cause: Could not create Transport. Reason: java.io.IOException: Broker named
'localhost' does not exist. 

Is there a way to suppress this error or Non-Error due to it being a slave? 

Thanks 

Mike 



--
View this message in context: http://camel.465427.n5.nabble.com/suppress-error-from-Camel-Route-on-slave-tp5775556.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: suppress error from Camel Route on slave

Posted by Mary Cochran <mc...@redhat.com>.
You can always use an Exception Handler to catch the exception.  Then just set handled to true.  The only issue here is that it would catch other IOExceptions as well.  You could do something similar to this to avoid catching all of those exceptions:

onException(IOException.class)
   choice()
     .when({get the exception text here}.equals("Broker named
'localhost' does not exist")
        .handled(true)
     .otherwise()
        .handled(false);

Another option depending on how large this part of your route is would be to use a try/catch and just continue on the catch. 
http://camel.apache.org/try-catch-finally.html

Mary Cochran
Red Hat Consulting
Email: mcochran@redhat.com | c: 419-543-0531 | http://www.redhat.com 

----- Original Message -----
From: "mtod09" <mt...@thetods.net>
To: users@camel.apache.org
Sent: Monday, December 28, 2015 6:27:04 PM
Subject: suppress error from Camel Route on slave

I'm running ActiveMQ 5.13 on a leveldb cluster. 
My ActiveMQ.xml config contains a Camel route in an include file. 

        <import resource="ESBRoute1.xml"/>

I route xml from one queue to a topic but when slave is in standby mode I
keep getting this error : 

INFO   | jvm 1    | 2015/12/28 18:10:26 | ERROR | Could not refresh JMS
Connection for destination 'esb.*' - retrying using
FixedBackOff{interval=5000, currentAttempts=181, maxAttempts=unlimited}.
Cause: Could not create Transport. Reason: java.io.IOException: Broker named
'localhost' does not exist. 

Is there a way to suppress this error or Non-Error due to it being a slave? 

Thanks 

Mike 



--
View this message in context: http://camel.465427.n5.nabble.com/suppress-error-from-Camel-Route-on-slave-tp5775556.html
Sent from the Camel - Users mailing list archive at Nabble.com.