Hi

I have created a ticket
https://issues.apache.org/jira/browse/CAMEL-3372

On Sun, Nov 28, 2010 at 11:02 AM, Bengt Rodehav <be...@rodehav.com> wrote:
> Claus,
>
> It's not really a big deal but I think most people would expect the exchange
> to be flagged as failed when it, in fact, has failed. If it can be easily
> implemented then yes I would prefer the exchange to be marked as failed.
>
> /Bengt
>
> 2010/11/27 Claus Ibsen <claus.ib...@gmail.com>
>
>> Hi
>>
>> Since the movedFailed is a special feature on file/ftp component I
>> wonder if we should add a new option to dictate if it should still
>> mark the Exchange as failed or not. This allows you to let the
>> onCompletion.onFailureOnly() to do additional stuff.
>>
>> Or we should consider it as a bug that the Exchange is not marked as
>> failed even though you had the moveFailed option enabled, which
>> handled the failed exchange.
>>
>> The moveFailed option was thought as - Okay in case of error just move
>> the file to X and dont bother me any more. Go on and continue with the
>> next file.
>> And hence it didnt flag the Exchange as failed.
>>
>> Any thoughts?
>>
>>
>> On Fri, Nov 26, 2010 at 4:09 PM, Bengt Rodehav <be...@rodehav.com> wrote:
>> > I tried the following approach:
>> >
>> > - In my onException processor I set a custom property indicating that the
>> > exchange has failed.
>> > - In my onCompletion processor I regard the exchange as failed if
>> > theExchange.isFailed() OR my custom property is true.
>> >
>> > This seems to do the trick. Are there any gaps I haven't thought of?
>> >
>> > Thanks for you reply Andreas. I  haven't tried your approach yet but it s
>> a
>> > good idea. Basically I will have to handle the moveFailed myself but it
>> > seems pretty easy looking at your example.
>> >
>> > /Bengt
>> >
>> > 2010/11/26 Andreas A. <andreasasm...@gmail.com>
>> >
>> >>
>> >> Hi
>> >>
>> >> You could do onCompletion().onFailureOnly() and in the same route as you
>> do
>> >> the message history route the message to your error destination. This of
>> >> course also means that you have to remove the "moveFailed" option.
>> >>
>> >> from("file:in?move=archive/${date:now:yyyyMMdd}/${file:name}")
>> >> .onCompletion().onFailureOnly()
>> >>
>> >>
>> >>
>> .wireTap("file:failed/${file:name.noext}-${date:now:yyyyMMddHHmmssSSS}.${file:ext}")
>> >>         .process(new FileHistoryProcessor())*
>> >>        .end()
>> >> .to("file:out");
>> >>
>> >> Something like that? Not sure about the syntax since I use Spring DSL.
>> >> --
>> >> View this message in context:
>> >>
>> http://camel.465427.n5.nabble.com/onCompletion-for-failed-exchanges-tp3281388p3281414.html
>> >> Sent from the Camel - Users mailing list archive at Nabble.com.
>> >>
>> >
>>
>>
>>
>> --
>> Claus Ibsen
>> -----------------
>> FuseSource
>> Email: cib...@fusesource.com
>> Web: http://fusesource.com
>> Twitter: davsclaus
>> Blog: http://davsclaus.blogspot.com/
>> Author of Camel in Action: http://www.manning.com/ibsen/
>>
>



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

Reply via email to