On Mon, Nov 29, 2010 at 10:05 AM, Bengt Rodehav <be...@rodehav.com> wrote:
> Claus,
>
> I tried to use both "onCompleteOnly" and "onFailureOnly" but ran into
> problems. Looking at the source code, it seems like they are mutually
> exclusive and only the last one will take effect.
>
> In my case I always want to be notified when an exchange is completed,
> both when it succeeds and when it fails, but I need to know whether it
> failed or not. I guess I will then have to use the "onCompletion"
> without the "onCompleteOnly" and "onFailureOnly" and instead look at
> the Exchange.EXCHANGE_CAUGHT property.
>

Just add two then:

onCompletion.onFailureOnly

onCompletion.onCompleteOnly


Or use that  Exchange.EXCHANGE_CAUGHT property


> Do you agree?
>
> Wouldn't it be convenient to be able to specify different onCompletion
> processors for successful exchanges and failed exchanges?
>
> /Bengt
>
>
>
> 2010/11/29 Claus Ibsen <claus.ib...@gmail.com>:
>> This is not a problem in Camel.
>>
>> See comment on ticket.
>>
>>
>> --
>> 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