camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Claus Ibsen <claus.ib...@gmail.com>
Subject Re: Alert by mail onException...but only one mail
Date Fri, 07 Jan 2011 13:27:05 GMT
Hi

You can use onCompletion on the route.
http://camel.apache.org/oncompletion.html

Then that will be invoked once the route is complete (eg after the
splitter is done)

The caused exception is stored as a property on the Exchange if you
want to grab it.



On Fri, Jan 7, 2011 at 11:06 AM, jmh <jeanmarc.herzet@nrb.be> wrote:
>
> Hello,
>
> first of all, best wishes for 2011 and long life to Camel !
>
> My question is :
>
> I have a route which consumes a text file (from("file:...")) containing some
> lines (with "\n" as separator)
>
>
> Suppose I have a problem when I'm processing a line in my route and it
> remains 1000 lines to process, how can I onException (see below) send only
> one alert mail and not 1000 mails with the same exception ?
>
> onException(MyProcessException.class).to(smtpTechnicalSupport);
>
> Thanks for solution
>
> JM
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/Alert-by-mail-onException-but-only-one-mail-tp3331622p3331622.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>



-- 
Claus Ibsen
-----------------
FuseSource
Email: cibsen@fusesource.com
Web: http://fusesource.com
Twitter: davsclaus
Blog: http://davsclaus.blogspot.com/
Author of Camel in Action: http://www.manning.com/ibsen/

Mime
View raw message