You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by anand sridhar <an...@gmail.com> on 2012/01/18 00:03:48 UTC

What does 'Exchange ending ' mean

I was hoping the community could help me understand the exact meaning of
'Exchange ending' as mentioned in Camel Docs about
DefaultErrorHandler<http://camel.apache.org/defaulterrorhandler.html>
.

For example, my route is as below -

from("ftp://x.x.x.x.?consumer.delay=30000").
.unmarshall().csv()
.to("endpoint1")
.to("endpoint2")
.to("endpoint3")
.end();

The above route polls a FTP location for files every 30 seconds.  If at a
certain instant , one of the stages of the route throws exception, will
polling continue further. ?
If not, could  some one advise the best strategy to continue polling. ?

Thanks,
Anand

Re: What does 'Exchange ending ' mean

Posted by anand sridhar <an...@gmail.com>.
Thank you Claus.
I will use the book to know more.

-Anand

On Wed, Jan 18, 2012 at 8:54 AM, Claus Ibsen <cl...@gmail.com> wrote:

> Hi
>
> On Wed, Jan 18, 2012 at 12:03 AM, anand sridhar <an...@gmail.com>
> wrote:
> > I was hoping the community could help me understand the exact meaning of
> > 'Exchange ending' as mentioned in Camel Docs about
> > DefaultErrorHandler<http://camel.apache.org/defaulterrorhandler.html>
> >
>
> The error handling documentation at Apache is a bit .. well not so
> well structured.
>
> "ends" means that the message will not continue being routed. So the
> routing breaks where the exception occurred, and the exception is
> propagated back to the consumer/caller.
>
>
> .
> >
> > For example, my route is as below -
> >
> > from("ftp://x.x.x.x.?consumer.delay=30000").
> > .unmarshall().csv()
> > .to("endpoint1")
> > .to("endpoint2")
> > .to("endpoint3")
> > .end();
> >
> > The above route polls a FTP location for files every 30 seconds.  If at a
> > certain instant , one of the stages of the route throws exception, will
> > polling continue further. ?
> > If not, could  some one advise the best strategy to continue polling. ?
> >
>
> The FTP consumer is also a batch consumer
> http://camel.apache.org/batch-consumer.html
>
> Which means it pickup X inputs in a batch (eg a FTP consumer detects X
> number of files to download).
> And then it processes each file one by one, from the batch.
>
> So if one file fails to process and an exception is thrown. Then by
> default the FTP consumer will continue with the next file and so on.
>
>
> Error handling is a hard topic to get right. And there is no one-shoe
> size that fits all. So there is many knobs you can customize with
> Camel.
>
> Camel in Action book, chapter 5, has 34 pages all about error handling.
>
>
>
>
> > Thanks,
> > Anand
>
>
>
> --
> Claus Ibsen
> -----------------
> FuseSource
> Email: cibsen@fusesource.com
> Web: http://fusesource.com
> Twitter: davsclaus, fusenews
> Blog: http://davsclaus.blogspot.com/
> Author of Camel in Action: http://www.manning.com/ibsen/
>

Re: What does 'Exchange ending ' mean

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

On Wed, Jan 18, 2012 at 12:03 AM, anand sridhar <an...@gmail.com> wrote:
> I was hoping the community could help me understand the exact meaning of
> 'Exchange ending' as mentioned in Camel Docs about
> DefaultErrorHandler<http://camel.apache.org/defaulterrorhandler.html>
>

The error handling documentation at Apache is a bit .. well not so
well structured.

"ends" means that the message will not continue being routed. So the
routing breaks where the exception occurred, and the exception is
propagated back to the consumer/caller.


.
>
> For example, my route is as below -
>
> from("ftp://x.x.x.x.?consumer.delay=30000").
> .unmarshall().csv()
> .to("endpoint1")
> .to("endpoint2")
> .to("endpoint3")
> .end();
>
> The above route polls a FTP location for files every 30 seconds.  If at a
> certain instant , one of the stages of the route throws exception, will
> polling continue further. ?
> If not, could  some one advise the best strategy to continue polling. ?
>

The FTP consumer is also a batch consumer
http://camel.apache.org/batch-consumer.html

Which means it pickup X inputs in a batch (eg a FTP consumer detects X
number of files to download).
And then it processes each file one by one, from the batch.

So if one file fails to process and an exception is thrown. Then by
default the FTP consumer will continue with the next file and so on.


Error handling is a hard topic to get right. And there is no one-shoe
size that fits all. So there is many knobs you can customize with
Camel.

Camel in Action book, chapter 5, has 34 pages all about error handling.




> Thanks,
> Anand



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