You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by bocamel <jo...@gmail.com> on 2014/07/08 19:03:46 UTC

How to abort retry in onRedelivery processor?

I have an OnException for SocketTimeoutException, at context level.  The
OnException has a redeliveryPolicy that does a number of retries.  But I
would like to choose whether to retry based on the message that fails.  Is
it possible to implement this control in an onRedelivery processor?  That
is, in the onRedelivery processor, it will examine the message.  If the
message is of certain type, then "abort" the retry and directly jump into
the exception handling defined in the OnException?  I certainly can stop the
route in the onRedelivery processor but that would bypass the exception
handling defined in the OnException as well.  Any suggestion would be
greatly appreciated?



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-abort-retry-in-onRedelivery-processor-tp5753554.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to abort retry in onRedelivery processor?

Posted by bocamel <jo...@gmail.com>.
Of course, Claus.  I should have thought about it - but got my mind stuck in
the onRedelivery thing :-).  Thank you very much!  It works beautifully.



--
View this message in context: http://camel.465427.n5.nabble.com/How-to-abort-retry-in-onRedelivery-processor-tp5753554p5753560.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: How to abort retry in onRedelivery processor?

Posted by Claus Ibsen <cl...@gmail.com>.
Hi

There is a retryWhile you can use

On Tue, Jul 8, 2014 at 7:03 PM, bocamel <jo...@gmail.com> wrote:
> I have an OnException for SocketTimeoutException, at context level.  The
> OnException has a redeliveryPolicy that does a number of retries.  But I
> would like to choose whether to retry based on the message that fails.  Is
> it possible to implement this control in an onRedelivery processor?  That
> is, in the onRedelivery processor, it will examine the message.  If the
> message is of certain type, then "abort" the retry and directly jump into
> the exception handling defined in the OnException?  I certainly can stop the
> route in the onRedelivery processor but that would bypass the exception
> handling defined in the OnException as well.  Any suggestion would be
> greatly appreciated?
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-abort-retry-in-onRedelivery-processor-tp5753554.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
Red Hat, Inc.
Email: cibsen@redhat.com
Twitter: davsclaus
Blog: http://davsclaus.com
Author of Camel in Action: http://www.manning.com/ibsen
hawtio: http://hawt.io/
fabric8: http://fabric8.io/