I would like to implement Apache Camel route with retry and Hystrix circuit breaker. My route looks like this:
<route>
......
<onException>
<exception>java.lang.Exception</exception>
<redeliveryPolicy redeliveryDelay="150" maximumRedeliveries="3" logRetryAttempted="true" retryAttemptedLogLevel="WARN"/>
</onException>
<hystrix>
<hystrixConfiguration id="MyServiceHystrix" />
<to uri="{{my.service.endpoint}}?bridgeEndpoint=true"/>
</hystrix>
</route>
When camel http4 endpoint is called inside Hystrix command thread, the CamelInternalProcessor
does not call RedeliveryErrorHandler
and there is no retry.
The basically the stack trace deference is:
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:542)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:120)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)
at org.apache.camel.processor.CamelInternalProcessor.process(CamelInternalProcessor.java:197)
at org.apache.camel.component.direct.DirectProducer.process(DirectProducer.java:62)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:120)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:83)
Does anybody know why this happens? Can I combine both without splitting the route?