camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bijoy <>
Subject Handling ConnectException at route startup
Date Thu, 09 Jan 2014 06:57:16 GMT

I'm planning to design an application which can receive files from multiple
transports like JMS, FTP, FILE, REST etc. I'm having trouble to handle the
ConnectException thrown at route startup if any endpoint(JMS,FTP etc.) is

I have designed a global exception handler using onException which is able
to handle the exceptions once the route is started. Consider following

1) Suppose we have a route FILE --> JMS --> Process --> FTP.If FILE
consumer is trying to send a file to JMS and JMS server is down then
ConnectException is thrown and handled by global exception handler. But if
there is no file to consume for FILE consumer and JMS server goes down then
ConnectException is thrown by activemq(the broker I used) but this
exception is not handled by exception handler.

2)  Now if we have a route JMS --> FILE --> Process --> FTP. If the JMS
server is down while trying to start the route we get ConnectException
which is not handled by global exception handler.

After exploring some discussion threads I understood to handle such
ConnectException we need have exception listeners or need to do some socket
programing for individual components. But I don't want to create exception
listeners for individual component. Instead is there any way to globally
handle such ConnectException be it thrown by JMS, FTP or REST or by any
other network component?

Thanks for short feedback!


View this message in context:
Sent from the Camel - Users mailing list archive at
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message