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.





Reply via email to