You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by Maxime Tremblay <ma...@acprail.com> on 2016/10/31 14:44:36 UTC

Hystrix Fallback not executed on Thread Pool/Semaphore rejection

Hi,

In the Camel-Hystrix component, what motivated the choice the execute the
Fallback only when an Exception is raised ?

Why not to let the end user choose if they want to execute the fallback or
not when no Exception is raised ?

To put in context:

The getFallback() is called by Hystrix in all the cases documented in
Hystrix doc:
"Hystrix will execute this fallback for all types of failure such as run()
failure, timeout, thread pool or semaphore rejection, and circuit-breaker
short-circuiting. "

Cf: https://github.com/Netflix/Hystrix/wiki/How-To-Use#Fallback

However, Camel-Hystrix sometimes does not execute the fallback, eg. on
thread pool or semaphore rejection, because no Exception is raised those
cases.

Cf line 50 of:
https://github.com/apache/camel/blob/master/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessorCommand.java

Best Regards,

Max

Re: Hystrix Fallback not executed on Thread Pool/Semaphore rejection

Posted by Maxime Tremblay <ma...@acprail.com>.
Great, thank you for the fix.

On Tue, Nov 1, 2016 at 7:23 AM, Claus Ibsen <cl...@gmail.com> wrote:

> Hi
>
> Ah yes thats a bug. I have logged a ticket
> https://issues.apache.org/jira/browse/CAMEL-10430
>
> We should get the exception from the command which then also has
> exception for other kind of failures such as rejected etc
>
>
>
> On Mon, Oct 31, 2016 at 3:44 PM, Maxime Tremblay
> <ma...@acprail.com> wrote:
> > Hi,
> >
> > In the Camel-Hystrix component, what motivated the choice the execute the
> > Fallback only when an Exception is raised ?
> >
> > Why not to let the end user choose if they want to execute the fallback
> or
> > not when no Exception is raised ?
> >
> > To put in context:
> >
> > The getFallback() is called by Hystrix in all the cases documented in
> > Hystrix doc:
> > "Hystrix will execute this fallback for all types of failure such as
> run()
> > failure, timeout, thread pool or semaphore rejection, and circuit-breaker
> > short-circuiting. "
> >
> > Cf: https://github.com/Netflix/Hystrix/wiki/How-To-Use#Fallback
> >
> > However, Camel-Hystrix sometimes does not execute the fallback, eg. on
> > thread pool or semaphore rejection, because no Exception is raised those
> > cases.
> >
> > Cf line 50 of:
> > https://github.com/apache/camel/blob/master/components/
> camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/
> HystrixProcessorCommand.java
> >
> > Best Regards,
> >
> > Max
>
>
>
> --
> Claus Ibsen
> -----------------
> http://davsclaus.com @davsclaus
> Camel in Action 2: https://www.manning.com/ibsen2
>

Re: Hystrix Fallback not executed on Thread Pool/Semaphore rejection

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

Ah yes thats a bug. I have logged a ticket
https://issues.apache.org/jira/browse/CAMEL-10430

We should get the exception from the command which then also has
exception for other kind of failures such as rejected etc



On Mon, Oct 31, 2016 at 3:44 PM, Maxime Tremblay
<ma...@acprail.com> wrote:
> Hi,
>
> In the Camel-Hystrix component, what motivated the choice the execute the
> Fallback only when an Exception is raised ?
>
> Why not to let the end user choose if they want to execute the fallback or
> not when no Exception is raised ?
>
> To put in context:
>
> The getFallback() is called by Hystrix in all the cases documented in
> Hystrix doc:
> "Hystrix will execute this fallback for all types of failure such as run()
> failure, timeout, thread pool or semaphore rejection, and circuit-breaker
> short-circuiting. "
>
> Cf: https://github.com/Netflix/Hystrix/wiki/How-To-Use#Fallback
>
> However, Camel-Hystrix sometimes does not execute the fallback, eg. on
> thread pool or semaphore rejection, because no Exception is raised those
> cases.
>
> Cf line 50 of:
> https://github.com/apache/camel/blob/master/components/camel-hystrix/src/main/java/org/apache/camel/component/hystrix/processor/HystrixProcessorCommand.java
>
> Best Regards,
>
> Max



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2