camel-users mailing list archives

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

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
down.

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

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!

Regards,
Bijoy




--
View this message in context: http://camel.465427.n5.nabble.com/Handling-ConnectException-at-route-startup-tp5745762.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message