camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From moj0002 <>
Subject retrieving iru in onException
Date Mon, 17 Mar 2014 02:48:26 GMT
I am trying to write a simple "ping" application. I ping urls in a multicast
and if there is a connection exception I catch it in a onException which
calls a aggregation that builds an email

If myFirstURLToPing is down I can't figure out out how to pass the URL via
the Exception to the email body.

I can't find something like ${to.uri} in the Message or Exchange. This seems
that it should be easy to get from the exception but I can't find any
references to the uri variable.

<route >
            <from uri="timer://foo?fixedRate=true&amp;period=3600000"
                <to http://myFirstURLToPing:1234" />
                <to http://mySecondURLToPing:1234" />
                <to http://myThirdURLToPing:1234" />


<onException useOriginalMessage="true">
                <simple>DOWN  >>>  <HERE  SHOLD the URI BE
           <to uri="direct:buildEmaiBody"/> 

<from uri="direct:buildEmaiBody"/>
<aggregate strategyRef="mailBodyAppender" strategyMethodName="append"
 <to smpt://.../>

I would want my email to show

DOWN  >>> http://myFirstURLToPing:1234
DOWN  >>> http://myThirdURLToPing:1234

I have figured out a way by creating a route for each URL to ping, naming
the route the same as the URL to ping and then use ${routeId} but that seems
very clumpsy

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

View raw message