camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Carlos Rodriguez Fernandez <carlosrodrifernan...@gmail.com>
Subject Re: Understanding Error Handling on steps
Date Wed, 03 Aug 2016 17:11:18 GMT
If I understand correctly, the retries on the entry points to fetch the
message are defined by the entry point configurations, and when the Apache
Camel documentation mentions "redelivery" is talking about the delivery of
the messages that was already picked up by the entry point of the route
definition.

When the route is transactional, then the "redelivery" includes the
delivery and processing of the message all the way to the endpoint ("to"
definition).

So in my example, I won't need to do the onException after the "from".

 from(notificationSystemInboundEndpoint)

                    .process(processor)

                    .onException(Exception.class)

                    .maximumRedeliveries(0)

                    .logStackTrace(true)

                    .handled(true);
I kind of answer myself the question, (or I think I did). I didn't find a
clear explanation in the documentation of what the "redelivery" actually
meant in details. I think I figured it out after cloning the apache camel
project and looking/debugging the camel-kafka code. I gotta love
open-source.

Regards,
Carlos.

On Mon, Aug 1, 2016 at 4:23 PM Carlos Rodriguez Fernandez <
carlosrodrifernandez@gmail.com> wrote:

> Hi,
>
> I'm trying to understand the error handling in Apache Camel. I have
> defined a route to processes Kafka messages and I want the fetching to keep
> trying forever, but to ignore exceptions from the processor. So I have this
> setup:
>
>                 from(notificationSystemInboundEndpoint)
>
>                     .onException(Exception.class)
>
>                         .maximumRedeliveries(-1)
>
>                     .end()
>
>                     .process(processor)
>
>                     .onException(Exception.class)
>
>                     .maximumRedeliveries(0)
>
>                     .logStackTrace(true)
>
>                     .handled(true);
>
>
> I'm not sure this is correct. What would be the best way to do this?
>
>
> Thank you,
>
> Carlos.
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message