You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by "Abhishek.Jha09" <ab...@gmail.com> on 2017/03/16 11:06:53 UTC
How to get exception which caused the hystrix fallback?
Hi,
I'm testing hystrix along with camel routes (in JAVA DSL). So these routes
are essentially of the form:
[from(direct:a)
.hystrix()
.to("http4:localhost:8080/mock/success")
.onFallBack()
.process(ex -> ex.getOut().setBody("Hystrix fallback message"))
.end()]
In this route, when fallback is triggered, I want to log the root cause
which triggered the fallback. Is there a way to do this?
--
View this message in context: http://camel.465427.n5.nabble.com/How-to-get-exception-which-caused-the-hystrix-fallback-tp5795574.html
Sent from the Camel - Users mailing list archive at Nabble.com.
Re: How to get exception which caused the hystrix fallback?
Posted by Claus Ibsen <cl...@gmail.com>.
Yeah its stored as a property on the exchange
http://camel.apache.org/why-is-the-exception-null-when-i-use-onexception.html
On Thu, Mar 16, 2017 at 12:06 PM, Abhishek.Jha09 <ab...@gmail.com> wrote:
> Hi,
>
> I'm testing hystrix along with camel routes (in JAVA DSL). So these routes
> are essentially of the form:
>
> [from(direct:a)
> .hystrix()
> .to("http4:localhost:8080/mock/success")
> .onFallBack()
> .process(ex -> ex.getOut().setBody("Hystrix fallback message"))
> .end()]
>
> In this route, when fallback is triggered, I want to log the root cause
> which triggered the fallback. Is there a way to do this?
>
>
>
> --
> View this message in context: http://camel.465427.n5.nabble.com/How-to-get-exception-which-caused-the-hystrix-fallback-tp5795574.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
--
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2