camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ychawla <>
Subject Recipient List / Multiple Exceptions
Date Tue, 15 Dec 2009 23:20:30 GMT

Hello All,
I am trying to use Camel to write a simple monitoring application.  I want
to check to try to connect to multiple URLs and then if any of them fail,
send an email altering an admin.

My strategy was to use timer to run the application at a given interval and
then create a dynamic Recipient List of the URLs and catch any exceptions. 
Here is an example (using a static recipient list for simplicity):

<camel:camelContext xmlns=""
        <from uri="timer://foo?fixedRate=true&amp;period=60000"/>
 	  <setHeader headerName="CamelHttpMethod">

	 <recipientList delimiter=",">

          <camel:setBody><simple>URL that is failing:
	  <to uri="file:/home/yogesh/Desktop/pickup/Error"/>		

What I find is that both URL fail1 and fail2 throw exceptions, however, the
catch block will only display the second exception in the exception.message
expression.  Is there a way to save a history of all the exceptions?  Is
there a way to enter the catch block multiple times?  Is there a different
way to setup my route that is better than recipient list?  I have a spring
config file that already has the list of URLs that need to be called so I
just want to read that file, do an HTTP GET and if there is an error route
to an error URI.

Any help would be appreciated.


View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message