camel-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oskar Huminiecki (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (CAMEL-11279) Camel hystrix does not handle exceptions properly
Date Thu, 21 Dec 2017 16:31:00 GMT

    [ https://issues.apache.org/jira/browse/CAMEL-11279?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16300129#comment-16300129
] 

Oskar Huminiecki edited comment on CAMEL-11279 at 12/21/17 4:30 PM:
--------------------------------------------------------------------

I believe that exceptions are still not handled correctly (at least in 2.19.4)
Circuit breaker should be transparent when `closed` - so until it is `open` all exceptions
should be passed through not wrapped as it happening now (when fallback is disabled)

Current implementation always wraps original exception in `HystrixRuntimeException` - this
way it is neither transparent nor compatible with Java use with annotations.

For clarification: hystrix library always wraps cause with `HystrixRuntimeException` but Java
aspect is implementation unwraps it and in result annotation based hystrix in Java is transparent.
And it should behave same way in Camel.

I actually rised story CAMEL-12100


was (Author: huminio):
I believe that exceptions are still not handled correctly (at least in 2.19.4)
Circuit breaker should be transparent when `closed` - so until it is `open` all exceptions
should be passed through not wrapped as it happening now (when fallback is disabled)

Current implementation always wraps original exception in `HystrixRuntimeException` - this
way it is neither transparent nor compatible with Java use with annotations.

For clarification: hystrix library always wraps cause with `HystrixRuntimeException` but Java
aspect is implementation unwraps it and in result annotation based hystrix in Java is transparent.
And it should behave same way in Camel.



> Camel hystrix does not handle exceptions properly
> -------------------------------------------------
>
>                 Key: CAMEL-11279
>                 URL: https://issues.apache.org/jira/browse/CAMEL-11279
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-hystrix
>    Affects Versions: 2.18.2, 2.18.3, 2.19.0
>         Environment: spring boot 1.4.2
>            Reporter: Anton Krosnev
>            Assignee: Claus Ibsen
>             Fix For: 2.18.4, 2.19.1, 2.20.0
>
>
> Exceptions in the route executed by Hystrix are not propagated to Hystrix itself and
main features such as "circuit open" are not available, when errors pack up. The scenario
was working with fallbackEnabled="true" in 2.18.1. 
> I have prepared a JUnit test: https://github.com/anton-k11/camel/blob/cffa13cb8106731ba94aaff85a9dd81715315306/components/camel-hystrix/src/test/java/org/apache/camel/component/hystrix/processor/HystrixCircutExceptionTest.java
> The test works fine if the IOException on line 110 is comment out and instead a Thread.sleep
is used to simulate timeout.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message