I am trying to use the CircuitBreaker component in Apache camel (version: 3.8.0) using Quarkus (version: 1.12.0.Final) and have included the following dependency.
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-microprofile-fault-tolerance</artifactId>
</dependency>
My camel route code is as follows:
//Some code above
.circuitBreaker()
.faultToleranceConfiguration().timeoutEnabled(true).timeoutDuration(20000).end()
.toD(nettyHttp("https://myurl"))
.endCircuitBreaker()
//Some code below;
I am getting the following error at compile time
Caused by: java.lang.IllegalStateException: Cannot find camel-hystrix, camel-resilience4j or camel-microprofile-fault-tolerance on the classpath.
at org.apache.camel.reifier.CircuitBreakerReifier.createProcessor(CircuitBreakerReifier.java:32)
at org.apache.camel.reifier.ProcessorReifier.makeProcessor(ProcessorReifier.java:835)
at org.apache.camel.reifier.ProcessorReifier.addRoutes(ProcessorReifier.java:576)
What am I doing wrong or rather how to incorporate CircuitBreaker using Camel-Quarkus?
Thanks,
I am preparing a presentation for circuit breaker and quarkus. I'm working with the 1.12.0.Final quarkus version too. I did not come across any problem. ı think your problem is maven . remove .m2 folder from your computer and run again .
./mvnw compile quarkus:dev
if problem continues add this dependencies to your pom.xmland configure it like that