This is an automated email from the ASF dual-hosted git repository. jamesnetherton pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 6b01c12514571fa3fbb221f6599149430d73f4db Author: James Netherton <jamesnether...@gmail.com> AuthorDate: Wed May 20 07:04:55 2020 +0100 Add support for MicroProfile Fault Tolerance Fixes #1234 --- .../pages/list-of-camel-quarkus-extensions.adoc | 5 +- .../deployment/pom.xml | 79 ++++++++++++++++++++ .../MicroprofileFaultToleranceProcessor.java | 30 ++++++++ extensions/microprofile-fault-tolerance/pom.xml | 39 ++++++++++ .../microprofile-fault-tolerance/runtime/pom.xml | 87 ++++++++++++++++++++++ .../main/resources/META-INF/quarkus-extension.yaml | 29 ++++++++ extensions/pom.xml | 1 + integration-tests/microprofile/pom.xml | 6 +- .../MicroProfileFaultToleranceRoutes.java | 43 +++++++++++ .../MicroprofileFaultToleranceResource.java | 38 ++++++++++ .../metrics/MicroProfileMetricsRouteBuilder.java | 1 + .../MicroprofileFaultToleranceIT.java | 24 ++++++ .../MicroprofileFaultToleranceTest.java | 42 +++++++++++ .../it/metrics/MicroProfileMetricsTest.java | 2 +- poms/bom-deployment/pom.xml | 5 ++ poms/bom/pom.xml | 10 +++ 16 files changed, 438 insertions(+), 3 deletions(-) diff --git a/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc b/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc index 125de90..6ca7f5a 100644 --- a/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc +++ b/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc @@ -764,7 +764,7 @@ Level | Since | Description == Miscellaneous Extensions // others: START -Number of miscellaneous extensions: 12 in 12 JAR artifacts (0 deprecated) +Number of miscellaneous extensions: 13 in 13 JAR artifacts (0 deprecated) [width="100%",cols="4,1,1,5",options="header"] |=== @@ -788,6 +788,9 @@ Number of miscellaneous extensions: 12 in 12 JAR artifacts (0 deprecated) | (camel-quarkus-kotlin) | Native + Stable | 1.0.0-M3 | Write Camel integration routes in Kotlin +| (camel-quarkus-microprofile-fault-tolerance) | Native + + Stable | 1.0.0-M8 | Circuit Breaker EIP using Microprofile Fault Tolerance + | xref:extensions/microprofile-health.adoc[camel-quarkus-microprofile-health] | Native + Stable | 0.3.0 | Bridging Eclipse MicroProfile Health with Camel health checks diff --git a/extensions/microprofile-fault-tolerance/deployment/pom.xml b/extensions/microprofile-fault-tolerance/deployment/pom.xml new file mode 100644 index 0000000..24508e4 --- /dev/null +++ b/extensions/microprofile-fault-tolerance/deployment/pom.xml @@ -0,0 +1,79 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-microprofile-fault-tolerance-parent</artifactId> + <version>1.1.0-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <artifactId>camel-quarkus-microprofile-fault-tolerance-deployment</artifactId> + <name>Camel Quarkus :: Microprofile Fault Tolerance :: Deployment</name> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-bom-deployment</artifactId> + <version>${project.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> + </dependencyManagement> + + <dependencies> + <dependency> + <groupId>io.quarkus</groupId> + <artifactId>quarkus-smallrye-fault-tolerance-deployment</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-core-deployment</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-microprofile-fault-tolerance</artifactId> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <annotationProcessorPaths> + <path> + <groupId>io.quarkus</groupId> + <artifactId>quarkus-extension-processor</artifactId> + <version>${quarkus.version}</version> + </path> + </annotationProcessorPaths> + </configuration> + </plugin> + </plugins> + </build> + +</project> diff --git a/extensions/microprofile-fault-tolerance/deployment/src/main/java/org/apache/camel/quarkus/component/microprofile/fault/tolerance/deployment/MicroprofileFaultToleranceProcessor.java b/extensions/microprofile-fault-tolerance/deployment/src/main/java/org/apache/camel/quarkus/component/microprofile/fault/tolerance/deployment/MicroprofileFaultToleranceProcessor.java new file mode 100644 index 0000000..d5b8b14 --- /dev/null +++ b/extensions/microprofile-fault-tolerance/deployment/src/main/java/org/apache/camel/quarkus/component/microprofile/fault/tolerance/deployment/MicroprofileFaultToleranceProcessor.java @@ -0,0 +1,30 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.quarkus.component.microprofile.fault.tolerance.deployment; + +import io.quarkus.deployment.annotations.BuildStep; +import io.quarkus.deployment.builditem.FeatureBuildItem; + +class MicroprofileFaultToleranceProcessor { + + private static final String FEATURE = "camel-microprofile-fault-tolerance"; + + @BuildStep + FeatureBuildItem feature() { + return new FeatureBuildItem(FEATURE); + } +} diff --git a/extensions/microprofile-fault-tolerance/pom.xml b/extensions/microprofile-fault-tolerance/pom.xml new file mode 100644 index 0000000..0b313e7 --- /dev/null +++ b/extensions/microprofile-fault-tolerance/pom.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-build-parent</artifactId> + <version>1.1.0-SNAPSHOT</version> + <relativePath>../../poms/build-parent/pom.xml</relativePath> + </parent> + + <artifactId>camel-quarkus-microprofile-fault-tolerance-parent</artifactId> + <name>Camel Quarkus :: Microprofile Fault Tolerance</name> + <packaging>pom</packaging> + + <modules> + <module>deployment</module> + <module>runtime</module> + </modules> +</project> diff --git a/extensions/microprofile-fault-tolerance/runtime/pom.xml b/extensions/microprofile-fault-tolerance/runtime/pom.xml new file mode 100644 index 0000000..a0eb528 --- /dev/null +++ b/extensions/microprofile-fault-tolerance/runtime/pom.xml @@ -0,0 +1,87 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!-- + + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + +--> +<project xmlns="http://maven.apache.org/POM/4.0.0" + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" + xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> + <modelVersion>4.0.0</modelVersion> + <parent> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-microprofile-fault-tolerance-parent</artifactId> + <version>1.1.0-SNAPSHOT</version> + <relativePath>../pom.xml</relativePath> + </parent> + + <artifactId>camel-quarkus-microprofile-fault-tolerance</artifactId> + <name>Camel Quarkus :: Microprofile Fault Tolerance :: Runtime</name> + <description>Circuit Breaker EIP using Microprofile Fault Tolerance</description> + + <properties> + <firstVersion>1.0.0-M8</firstVersion> + </properties> + + <dependencyManagement> + <dependencies> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-bom</artifactId> + <version>${project.version}</version> + <type>pom</type> + <scope>import</scope> + </dependency> + </dependencies> + </dependencyManagement> + + <dependencies> + <dependency> + <groupId>io.quarkus</groupId> + <artifactId>quarkus-smallrye-fault-tolerance</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-core</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> + <artifactId>camel-microprofile-fault-tolerance</artifactId> + </dependency> + </dependencies> + + <build> + <plugins> + <plugin> + <groupId>io.quarkus</groupId> + <artifactId>quarkus-bootstrap-maven-plugin</artifactId> + </plugin> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <configuration> + <annotationProcessorPaths> + <path> + <groupId>io.quarkus</groupId> + <artifactId>quarkus-extension-processor</artifactId> + <version>${quarkus.version}</version> + </path> + </annotationProcessorPaths> + </configuration> + </plugin> + </plugins> + </build> +</project> diff --git a/extensions/microprofile-fault-tolerance/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/microprofile-fault-tolerance/runtime/src/main/resources/META-INF/quarkus-extension.yaml new file mode 100644 index 0000000..47d08a9 --- /dev/null +++ b/extensions/microprofile-fault-tolerance/runtime/src/main/resources/META-INF/quarkus-extension.yaml @@ -0,0 +1,29 @@ +# +# Licensed to the Apache Software Foundation (ASF) under one or more +# contributor license agreements. See the NOTICE file distributed with +# this work for additional information regarding copyright ownership. +# The ASF licenses this file to You under the Apache License, Version 2.0 +# (the "License"); you may not use this file except in compliance with +# the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# This is a generated file. Do not edit directly! +# To re-generate, run the following command from the top level directory: +# +# mvn -N cq:update-quarkus-metadata +# +--- +name: "Camel Microprofile Fault Tolerance" +description: "Circuit Breaker EIP using Microprofile Fault Tolerance" +metadata: + guide: "https://camel.apache.org/components/latest/microprofile-fault-tolerance-other.html" + categories: + - "integration" diff --git a/extensions/pom.xml b/extensions/pom.xml index c21625e..7e4765d 100644 --- a/extensions/pom.xml +++ b/extensions/pom.xml @@ -106,6 +106,7 @@ <module>log</module> <module>lzf</module> <module>mail</module> + <module>microprofile-fault-tolerance</module> <module>microprofile-health</module> <module>microprofile-metrics</module> <module>mongodb</module> diff --git a/integration-tests/microprofile/pom.xml b/integration-tests/microprofile/pom.xml index 3ee390f..c28458a 100644 --- a/integration-tests/microprofile/pom.xml +++ b/integration-tests/microprofile/pom.xml @@ -36,12 +36,16 @@ <!-- explicit dependencies of this module in the Maven sense, although they are required by the Quarkus Maven plugin. --> <!-- Please update rule whenever you change the dependencies of this module by running --> <!-- mvn process-resources -Pformat from the root directory --> - <mvnd.builder.rule>camel-quarkus-direct-deployment,camel-quarkus-log-deployment,camel-quarkus-microprofile-health-deployment,camel-quarkus-microprofile-metrics-deployment,camel-quarkus-support-policy-deployment</mvnd.builder.rule> + <mvnd.builder.rule>camel-quarkus-direct-deployment,camel-quarkus-log-deployment,camel-quarkus-microprofile-fault-tolerance-deployment,camel-quarkus-microprofile-health-deployment,camel-quarkus-microprofile-metrics-deployment,camel-quarkus-support-policy-deployment</mvnd.builder.rule> </properties> <dependencies> <dependency> <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-microprofile-fault-tolerance</artifactId> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-microprofile-health</artifactId> </dependency> <dependency> diff --git a/integration-tests/microprofile/src/main/java/org/apache/camel/quarkus/component/microprofile/it/faulttolerance/MicroProfileFaultToleranceRoutes.java b/integration-tests/microprofile/src/main/java/org/apache/camel/quarkus/component/microprofile/it/faulttolerance/MicroProfileFaultToleranceRoutes.java new file mode 100644 index 0000000..271daab --- /dev/null +++ b/integration-tests/microprofile/src/main/java/org/apache/camel/quarkus/component/microprofile/it/faulttolerance/MicroProfileFaultToleranceRoutes.java @@ -0,0 +1,43 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.quarkus.component.microprofile.it.faulttolerance; + +import java.util.concurrent.atomic.AtomicInteger; + +import org.apache.camel.builder.RouteBuilder; + +public class MicroProfileFaultToleranceRoutes extends RouteBuilder { + + public static final String FALLBACK_RESULT = "Fallback response"; + public static final String RESULT = "Hello Camel Quarkus MicroProfile Fault Tolerance"; + private static final AtomicInteger COUNTER = new AtomicInteger(); + + @Override + public void configure() throws Exception { + from("direct:faultTolerance") + .circuitBreaker() + .process(exchange -> { + if (COUNTER.incrementAndGet() == 1) { + throw new IllegalStateException("Simulated Exception"); + } + exchange.getMessage().setBody(RESULT); + }) + .onFallback() + .setBody().constant(FALLBACK_RESULT) + .end(); + } +} diff --git a/integration-tests/microprofile/src/main/java/org/apache/camel/quarkus/component/microprofile/it/faulttolerance/MicroprofileFaultToleranceResource.java b/integration-tests/microprofile/src/main/java/org/apache/camel/quarkus/component/microprofile/it/faulttolerance/MicroprofileFaultToleranceResource.java new file mode 100644 index 0000000..2e2214f --- /dev/null +++ b/integration-tests/microprofile/src/main/java/org/apache/camel/quarkus/component/microprofile/it/faulttolerance/MicroprofileFaultToleranceResource.java @@ -0,0 +1,38 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.quarkus.component.microprofile.it.faulttolerance; + +import javax.inject.Inject; +import javax.ws.rs.GET; +import javax.ws.rs.Path; +import javax.ws.rs.Produces; +import javax.ws.rs.core.MediaType; + +import org.apache.camel.ProducerTemplate; + +@Path("/microprofile-fault-tolerance") +public class MicroprofileFaultToleranceResource { + + @Inject + ProducerTemplate producerTemplate; + + @GET + @Produces(MediaType.TEXT_PLAIN) + public String triggerFaultToleranceRoute() { + return producerTemplate.requestBody("direct:faultTolerance", null, String.class); + } +} diff --git a/integration-tests/microprofile/src/main/java/org/apache/camel/quarkus/component/microprofile/it/metrics/MicroProfileMetricsRouteBuilder.java b/integration-tests/microprofile/src/main/java/org/apache/camel/quarkus/component/microprofile/it/metrics/MicroProfileMetricsRouteBuilder.java index 8495ff5..3cd7c4c 100644 --- a/integration-tests/microprofile/src/main/java/org/apache/camel/quarkus/component/microprofile/it/metrics/MicroProfileMetricsRouteBuilder.java +++ b/integration-tests/microprofile/src/main/java/org/apache/camel/quarkus/component/microprofile/it/metrics/MicroProfileMetricsRouteBuilder.java @@ -47,6 +47,7 @@ public class MicroProfileMetricsRouteBuilder extends RouteBuilder { .to("microprofile-metrics:meter:camel-quarkus-meter"); from("direct:timer") + .id("mp-metrics-timer") .to("microprofile-metrics:timer:camel-quarkus-timer?action=start") .delay(100) .to("microprofile-metrics:timer:camel-quarkus-timer?action=stop"); diff --git a/integration-tests/microprofile/src/test/java/org/apache/camel/quarkus/component/microprofile/it/faulttolerance/MicroprofileFaultToleranceIT.java b/integration-tests/microprofile/src/test/java/org/apache/camel/quarkus/component/microprofile/it/faulttolerance/MicroprofileFaultToleranceIT.java new file mode 100644 index 0000000..90bdf9f --- /dev/null +++ b/integration-tests/microprofile/src/test/java/org/apache/camel/quarkus/component/microprofile/it/faulttolerance/MicroprofileFaultToleranceIT.java @@ -0,0 +1,24 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.quarkus.component.microprofile.it.faulttolerance; + +import io.quarkus.test.junit.NativeImageTest; + +@NativeImageTest +class MicroprofileFaultToleranceIT extends MicroprofileFaultToleranceTest { + +} diff --git a/integration-tests/microprofile/src/test/java/org/apache/camel/quarkus/component/microprofile/it/faulttolerance/MicroprofileFaultToleranceTest.java b/integration-tests/microprofile/src/test/java/org/apache/camel/quarkus/component/microprofile/it/faulttolerance/MicroprofileFaultToleranceTest.java new file mode 100644 index 0000000..d5bd0c5 --- /dev/null +++ b/integration-tests/microprofile/src/test/java/org/apache/camel/quarkus/component/microprofile/it/faulttolerance/MicroprofileFaultToleranceTest.java @@ -0,0 +1,42 @@ +/* + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.quarkus.component.microprofile.it.faulttolerance; + +import io.quarkus.test.junit.QuarkusTest; +import io.restassured.RestAssured; +import org.hamcrest.Matchers; +import org.junit.jupiter.api.Test; + +@QuarkusTest +class MicroprofileFaultToleranceTest { + + @Test + public void testCamelMicroProfileFaultToleranceFallback() { + + // First request should trigger the fallback response + RestAssured.get("/microprofile-fault-tolerance") + .then() + .statusCode(200) + .body(Matchers.is(MicroProfileFaultToleranceRoutes.FALLBACK_RESULT)); + + // Next request(s) should trigger the expected response + RestAssured.get("/microprofile-fault-tolerance") + .then() + .statusCode(200) + .body(Matchers.is(MicroProfileFaultToleranceRoutes.RESULT)); + } +} diff --git a/integration-tests/microprofile/src/test/java/org/apache/camel/quarkus/component/microprofile/it/metrics/MicroProfileMetricsTest.java b/integration-tests/microprofile/src/test/java/org/apache/camel/quarkus/component/microprofile/it/metrics/MicroProfileMetricsTest.java index c511ac8..f6f0a59 100644 --- a/integration-tests/microprofile/src/test/java/org/apache/camel/quarkus/component/microprofile/it/metrics/MicroProfileMetricsTest.java +++ b/integration-tests/microprofile/src/test/java/org/apache/camel/quarkus/component/microprofile/it/metrics/MicroProfileMetricsTest.java @@ -94,7 +94,7 @@ class MicroProfileMetricsTest { RestAssured.get("/microprofile-metrics/timer") .then() .statusCode(200); - assertTrue(getMetricIntValue("camel.route.exchanges.total", CAMEL_CONTEXT_METRIC_TAG, "routeId=route7") > 0); + assertTrue(getMetricIntValue("camel.route.exchanges.total", CAMEL_CONTEXT_METRIC_TAG, "routeId=mp-metrics-timer") > 0); } @Test diff --git a/poms/bom-deployment/pom.xml b/poms/bom-deployment/pom.xml index b9c50ca..42584b7 100644 --- a/poms/bom-deployment/pom.xml +++ b/poms/bom-deployment/pom.xml @@ -549,6 +549,11 @@ </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-microprofile-fault-tolerance-deployment</artifactId> + <version>${camel-quarkus.version}</version> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-microprofile-health-deployment</artifactId> <version>${camel-quarkus.version}</version> </dependency> diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml index dea1e5f..79361a7 100644 --- a/poms/bom/pom.xml +++ b/poms/bom/pom.xml @@ -750,6 +750,11 @@ </dependency> <dependency> <groupId>org.apache.camel</groupId> + <artifactId>camel-microprofile-fault-tolerance</artifactId> + <version>${camel.version}</version> + </dependency> + <dependency> + <groupId>org.apache.camel</groupId> <artifactId>camel-microprofile-health</artifactId> <version>${camel.version}</version> </dependency> @@ -1578,6 +1583,11 @@ </dependency> <dependency> <groupId>org.apache.camel.quarkus</groupId> + <artifactId>camel-quarkus-microprofile-fault-tolerance</artifactId> + <version>${camel-quarkus.version}</version> + </dependency> + <dependency> + <groupId>org.apache.camel.quarkus</groupId> <artifactId>camel-quarkus-microprofile-health</artifactId> <version>${camel-quarkus.version}</version> </dependency>