You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Marco Westermann <Ma...@gmx.de> on 2011/07/06 09:48:20 UTC
error handler
Hi, just a little understanding question. If I have a route
from("file:///data/input/)
.to("direct:transform")
.to("direct:enrich")
.to("direct:transform)
.to("file:///data/output")
what message would
deadLetterChannel("direct:failedFiles").useOriginalMessage() handle,
when an error occur within one of the direct endpoints and how would the
scope of the error handler affect that behaviour?
Thank you Marco
Re: error handler
Posted by Filippo Balicchia <fb...@gmail.com>.
Direct component provide direct invocation between a producer a consumer.
In the route that you present seems that there is a problem because
you can't have two endpoint with the same name.
after that the flow is the this:
1: read from file:///data/input/
2: from the step 1 to("file:///data/output") there is no action
than the message is the same that you read on the step 1
Cheers
--Filippo
2011/7/6 Marco Westermann <Ma...@gmx.de>:
> Hi Filippo,
>
> thank you for your answer, but what is the orgininal input message when
> direct-routes come into play? If an error happens in one of the direct
> routes, is the original message then the one which comes as input into the
> direct-route or the one from the file-endpoint?
> And what is the original input message if we would exchange one of the
> direct with a jms endpoint?
>
>
> regards Marco
>
> Am 06.07.2011 10:08, schrieb Filippo Balicchia:
>>
>> DeadLetter channel use the orginal input message and move it on dead
>> letter channel queue.
>>
>> --Filippo
>>
>>
>>
>> 2011/7/6 Marco Westermann<Ma...@gmx.de>:
>>>
>>> Hi, just a little understanding question. If I have a route
>>>
>>> from("file:///data/input/)
>>> .to("direct:transform")
>>> .to("direct:enrich")
>>> .to("direct:transform)
>>> .to("file:///data/output")
>>>
>>> what message would
>>> deadLetterChannel("direct:failedFiles").useOriginalMessage() handle, when
>>> an
>>> error occur within one of the direct endpoints and how would the scope of
>>> the error handler affect that behaviour?
>>>
>>> Thank you Marco
>>>
>
>
Re: error handler
Posted by Claus Ibsen <cl...@gmail.com>.
On Wed, Jul 6, 2011 at 10:58 AM, Marco Westermann <Ma...@gmx.de> wrote:
> Hi Filippo,
>
> thank you for your answer, but what is the orgininal input message when
> direct-routes come into play? If an error happens in one of the direct
> routes, is the original message then the one which comes as input into the
> direct-route or the one from the file-endpoint?
> And what is the original input message if we would exchange one of the
> direct with a jms endpoint?
Ask the computer :)
The original message is the original input message, when the Camel
Exchange was created. So when you use the intra components such as
direct/seda etc. the original message is the very first route.
>
>
> regards Marco
>
> Am 06.07.2011 10:08, schrieb Filippo Balicchia:
>>
>> DeadLetter channel use the orginal input message and move it on dead
>> letter channel queue.
>>
>> --Filippo
>>
>>
>>
>> 2011/7/6 Marco Westermann<Ma...@gmx.de>:
>>>
>>> Hi, just a little understanding question. If I have a route
>>>
>>> from("file:///data/input/)
>>> .to("direct:transform")
>>> .to("direct:enrich")
>>> .to("direct:transform)
>>> .to("file:///data/output")
>>>
>>> what message would
>>> deadLetterChannel("direct:failedFiles").useOriginalMessage() handle, when
>>> an
>>> error occur within one of the direct endpoints and how would the scope of
>>> the error handler affect that behaviour?
>>>
>>> Thank you Marco
>>>
>
>
--
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: error handler
Posted by Marco Westermann <Ma...@gmx.de>.
Hi Filippo,
thank you for your answer, but what is the orgininal input message when
direct-routes come into play? If an error happens in one of the direct
routes, is the original message then the one which comes as input into
the direct-route or the one from the file-endpoint?
And what is the original input message if we would exchange one of the
direct with a jms endpoint?
regards Marco
Am 06.07.2011 10:08, schrieb Filippo Balicchia:
> DeadLetter channel use the orginal input message and move it on dead
> letter channel queue.
>
> --Filippo
>
>
>
> 2011/7/6 Marco Westermann<Ma...@gmx.de>:
>> Hi, just a little understanding question. If I have a route
>>
>> from("file:///data/input/)
>> .to("direct:transform")
>> .to("direct:enrich")
>> .to("direct:transform)
>> .to("file:///data/output")
>>
>> what message would
>> deadLetterChannel("direct:failedFiles").useOriginalMessage() handle, when an
>> error occur within one of the direct endpoints and how would the scope of
>> the error handler affect that behaviour?
>>
>> Thank you Marco
>>
Re: error handler
Posted by Filippo Balicchia <fb...@gmail.com>.
DeadLetter channel use the orginal input message and move it on dead
letter channel queue.
--Filippo
2011/7/6 Marco Westermann <Ma...@gmx.de>:
> Hi, just a little understanding question. If I have a route
>
> from("file:///data/input/)
> .to("direct:transform")
> .to("direct:enrich")
> .to("direct:transform)
> .to("file:///data/output")
>
> what message would
> deadLetterChannel("direct:failedFiles").useOriginalMessage() handle, when an
> error occur within one of the direct endpoints and how would the scope of
> the error handler affect that behaviour?
>
> Thank you Marco
>