camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gert Vanthienen <gert.vanthie...@skynet.be>
Subject Re: Retry based on bean method invocation response
Date Tue, 20 May 2008 07:44:16 GMT
L.S.,

Re-reading your question once more, I think my previous answer is 
completely off track... You want to retry an operation *without* ever 
encountering an exception, right?  You could do that with a 
content-based-router, something along these lines...
   from("direct:a").to("bean:...").choice().when(/*check outcome 
here*/).to("direct:a").otherwise().to("direct:b");

In the future, you might be able to achieve something similar with loop 
operations in the DSL (cfr. 
https://issues.apache.org/activemq/browse/CAMEL-325).  Does this answer 
your question?

Gert

Gert Vanthienen wrote:
> L.S.,
>
> I think you should be able to this by implementing your own 
> RedeliveryPolicy and plugging it in to the DeadLetterChannel.  Just 
> override the shouldRedeliver() method and call anything you want in 
> there to determine what to do.
>
> Gert
>
> vmasina wrote:
>> Is it possible to set retry policy based on response from method 
>> invocation
>> on a bean?
>>
>> I am able to set the retry policy based on exception thrown by a bean
>> invocation. Please advice on how to achieve the same retry support 
>> based on
>> response from the bean method invocation.
>>
>>
>>   
>
>


Mime
View raw message