This is an automated email from the ASF dual-hosted git repository.
jamesnetherton pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/main by this push:
new 1ea9969ed6 Add infinispan-cluster-service extension
1ea9969ed6 is described below
commit 1ea9969ed6760a07711a0fdcd75d6df76d39b6db
Author: James Netherton <[email protected]>
AuthorDate: Tue Feb 17 08:44:01 2026 +0000
Add infinispan-cluster-service extension
Fixes #8126
---
catalog/pom.xml | 13 +
docs/modules/ROOT/nav.adoc | 1 +
.../extensions/infinispan-cluster-service.adoc | 178 ++++++++++++++
.../infinispan-cluster-service/deployment/pom.xml | 74 ++++++
.../InfinispanClusterServiceProcessor.java | 39 +++
.../InfinispanClusterServiceConfigDefaultTest.java | 74 ++++++
.../InfinispanClusterServiceConfigEnabledTest.java | 117 +++++++++
extensions/infinispan-cluster-service/pom.xml | 37 +++
.../infinispan-cluster-service/runtime/pom.xml | 74 ++++++
.../runtime/src/main/doc/configuration.adoc | 32 +++
.../InfinispanClusterServiceBuildTimeConfig.java | 47 ++++
.../cluster/InfinispanClusterServiceRecorder.java | 55 +++++
.../InfinispanClusterServiceRuntimeConfig.java | 105 ++++++++
.../main/resources/META-INF/quarkus-extension.yaml | 35 +++
extensions/pom.xml | 1 +
integration-tests/master-infinispan/pom.xml | 273 +++++++++++++++++++++
.../it/InfinispanClusterServiceResource.java | 35 +++
.../master/it/InfinispanClusterServiceRoutes.java | 39 +++
.../src/main/resources/application.properties | 23 ++
.../master/it/InfinispanClusterServiceIT.java | 23 ++
.../master/it/InfinispanClusterServiceTest.java | 117 +++++++++
.../it/InfinispanClusterServiceTestResource.java | 75 ++++++
.../test/resources/infinispan-cluster-service.xml | 21 ++
integration-tests/pom.xml | 1 +
pom.xml | 1 +
poms/bom/pom.xml | 10 +
poms/bom/src/main/generated/flattened-full-pom.xml | 10 +
.../src/main/generated/flattened-reduced-pom.xml | 10 +
.../generated/flattened-reduced-verbose-pom.xml | 10 +
tooling/scripts/test-categories.yaml | 1 +
tooling/test-list/pom.xml | 1 +
31 files changed, 1532 insertions(+)
diff --git a/catalog/pom.xml b/catalog/pom.xml
index a4ff286095..ca2e0c75bb 100644
--- a/catalog/pom.xml
+++ b/catalog/pom.xml
@@ -1943,6 +1943,19 @@
</exclusion>
</exclusions>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-infinispan-cluster-service</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-influxdb</artifactId>
diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index f5259c0892..559a56202c 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -168,6 +168,7 @@
*** xref:reference/extensions/iso8583.adoc[ISO-8583]
*** xref:reference/extensions/ignite.adoc[Ignite Cache]
*** xref:reference/extensions/infinispan.adoc[Infinispan]
+*** xref:reference/extensions/infinispan-cluster-service.adoc[Infinispan
Cluster Service]
*** xref:reference/extensions/influxdb.adoc[InfluxDB]
*** xref:reference/extensions/jaxb.adoc[JAXB]
*** xref:reference/extensions/jcr.adoc[JCR]
diff --git
a/docs/modules/ROOT/pages/reference/extensions/infinispan-cluster-service.adoc
b/docs/modules/ROOT/pages/reference/extensions/infinispan-cluster-service.adoc
new file mode 100644
index 0000000000..033e5d0434
--- /dev/null
+++
b/docs/modules/ROOT/pages/reference/extensions/infinispan-cluster-service.adoc
@@ -0,0 +1,178 @@
+// Do not edit directly!
+// This file was generated by
camel-quarkus-maven-plugin:update-extension-doc-page
+[id="extensions-infinispan-cluster-service"]
+= Infinispan Cluster Service
+:linkattrs:
+:cq-artifact-id: camel-quarkus-infinispan-cluster-service
+:cq-native-supported: true
+:cq-status: Stable
+:cq-status-deprecation: Stable
+:cq-description: Provides an Infinispan implementation of the Camel Cluster
Service SPI
+:cq-deprecated: false
+:cq-jvm-since: 3.32.0
+:cq-native-since: 3.32.0
+
+ifeval::[{doc-show-badges} == true]
+[.badges]
+[.badge-key]##JVM since##[.badge-supported]##3.32.0## [.badge-key]##Native
since##[.badge-supported]##3.32.0##
+endif::[]
+
+Provides an Infinispan implementation of the Camel Cluster Service SPI
+
+[id="extensions-infinispan-cluster-service-maven-coordinates"]
+== Maven coordinates
+
+https://{link-quarkus-code-generator}/?extension-search=camel-quarkus-infinispan-cluster-service[Create
a new project with this extension on {link-quarkus-code-generator},
window="_blank"]
+
+Or add the coordinates to your existing project:
+
+[source,xml]
+----
+<dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-infinispan-cluster-service</artifactId>
+</dependency>
+----
+ifeval::[{doc-show-user-guide-link} == true]
+Check the xref:user-guide/index.adoc[User guide] for more information about
writing Camel Quarkus applications.
+endif::[]
+
+[id="extensions-infinispan-cluster-service-additional-camel-quarkus-configuration"]
+== Additional Camel Quarkus configuration
+
+[id="extensions-infinispan-cluster-service-configuration-having-only-a-single-consumer-in-a-cluster-consuming-from-a-given-endpoint"]
+=== Having only a single consumer in a cluster consuming from a given endpoint
+
+When the same route is deployed on multiple JVMs, it could be interesting to
use this extension in conjunction with the
xref:reference/extensions/master.adoc[Master one].
+In such a setup, a single consumer will be active at a time across the whole
camel master namespace.
+
+For instance, having the route below deployed on multiple JVMs:
+
+[source,java]
+----
+from("master:ns:timer:test?period=100")
+ .log("Timer invoked on a single JVM at a time");
+----
+
+As a result, a single consumer will be active across the `ns` camel master
namespace.
+It means that, at a given time, only a single timer will generate exchanges
across all JVMs.
+In other words, messages will be logged every 100ms on a single JVM at a time.
+
+[id="extensions-infinispan-cluster-service-configuration-infinispan-configuration"]
+==== Infinispan Configuration
+
+You can configure the Infinispan client with the various
`quarkus.camel.cluster.infinispan` configuration options in
`application.properties.
+
+[source,properties]
+----
+
+quarkus.camel.cluster.infinispan.hosts=localhost:11222
+quarkus.camel.cluster.infinispan.username=admin
+quarkus.camel.cluster.infinispan.password=2s3cr3t
+
+# Optional additional configuration properties
+quarkus.camel.cluster.infinispan.configuration-properties."infinispan.client.hotrod.client_intelligence"
= BASIC
+quarkus.camel.cluster.infinispan.configuration-properties."infinispan.client.hotrod.connect_timeout"
= 5000
+----
+
+
+[width="100%",cols="80,5,15",options="header"]
+|===
+| Configuration property | Type | Default
+
+
+a|icon:lock[title=Fixed at build time]
[[quarkus-camel-cluster-infinispan-enabled]]`link:#quarkus-camel-cluster-infinispan-enabled[quarkus.camel.cluster.infinispan.enabled]`
+
+Whether an Infinispan Cluster Service should be automatically configured
according to
+'quarkus.camel.cluster.infinispan.++*++' configurations.
+| `boolean`
+| `true`
+
+a|
[[quarkus-camel-cluster-infinispan-id]]`link:#quarkus-camel-cluster-infinispan-id[quarkus.camel.cluster.infinispan.id]`
+
+The cluster service ID.
+| `string`
+|
+
+a|
[[quarkus-camel-cluster-infinispan-order]]`link:#quarkus-camel-cluster-infinispan-order[quarkus.camel.cluster.infinispan.order]`
+
+The service lookup order/priority.
+| `int`
+|
+
+a|
[[quarkus-camel-cluster-infinispan-attributes-attributes]]`link:#quarkus-camel-cluster-infinispan-attributes-attributes[quarkus.camel.cluster.infinispan.attributes."attributes"]`
+
+The custom attributes associated to the service.
+| `Map<String,String>`
+|
+
+a|
[[quarkus-camel-cluster-infinispan-configuration-uri]]`link:#quarkus-camel-cluster-infinispan-configuration-uri[quarkus.camel.cluster.infinispan.configuration-uri]`
+
+The Infinispan configuration URI. Can be used to specify a custom Infinispan
configuration file.
+| `string`
+|
+
+a|
[[quarkus-camel-cluster-infinispan-hosts]]`link:#quarkus-camel-cluster-infinispan-hosts[quarkus.camel.cluster.infinispan.hosts]`
+
+The Infinispan server hosts (e.g., "localhost:11222").
+| `string`
+|
+
+a|
[[quarkus-camel-cluster-infinispan-secure]]`link:#quarkus-camel-cluster-infinispan-secure[quarkus.camel.cluster.infinispan.secure]`
+
+Enable secure connections to an Infinispan server.
+| `boolean`
+|
+
+a|
[[quarkus-camel-cluster-infinispan-username]]`link:#quarkus-camel-cluster-infinispan-username[quarkus.camel.cluster.infinispan.username]`
+
+Username for authentication with the Infinispan server.
+| `string`
+|
+
+a|
[[quarkus-camel-cluster-infinispan-password]]`link:#quarkus-camel-cluster-infinispan-password[quarkus.camel.cluster.infinispan.password]`
+
+Password for authentication with the Infinispan server.
+| `string`
+|
+
+a|
[[quarkus-camel-cluster-infinispan-sasl-mechanism]]`link:#quarkus-camel-cluster-infinispan-sasl-mechanism[quarkus.camel.cluster.infinispan.sasl-mechanism]`
+
+SASL mechanism for authentication (e.g., DIGEST-MD5, PLAIN, SCRAM-SHA-256).
+| `string`
+|
+
+a|
[[quarkus-camel-cluster-infinispan-security-realm]]`link:#quarkus-camel-cluster-infinispan-security-realm[quarkus.camel.cluster.infinispan.security-realm]`
+
+Security realm for authentication.
+| `string`
+|
+
+a|
[[quarkus-camel-cluster-infinispan-security-server-name]]`link:#quarkus-camel-cluster-infinispan-security-server-name[quarkus.camel.cluster.infinispan.security-server-name]`
+
+Security server name for authentication.
+| `string`
+|
+
+a|
[[quarkus-camel-cluster-infinispan-configuration-properties-configuration-properties]]`link:#quarkus-camel-cluster-infinispan-configuration-properties-configuration-properties[quarkus.camel.cluster.infinispan.configuration-properties."configuration-properties"]`
+
+Additional configuration properties for the Infinispan client.
+| `Map<String,String>`
+|
+
+a|
[[quarkus-camel-cluster-infinispan-lifespan]]`link:#quarkus-camel-cluster-infinispan-lifespan[quarkus.camel.cluster.infinispan.lifespan]`
+
+Lifespan for entries in the cluster view cache.
+| `long`
+| `30`
+
+a|
[[quarkus-camel-cluster-infinispan-lifespan-time-unit]]`link:#quarkus-camel-cluster-infinispan-lifespan-time-unit[quarkus.camel.cluster.infinispan.lifespan-time-unit]`
+
+Time unit for lifespan (e.g., SECONDS, MINUTES, HOURS).
+| `nanoseconds`, `microseconds`, `milliseconds`, `seconds`, `minutes`,
`hours`, `days`
+| `seconds`
+|===
+
+[.configuration-legend]
+{doc-link-icon-lock}[title=Fixed at build time] Configuration property fixed
at build time. All other configuration properties are overridable at runtime.
+
diff --git a/extensions/infinispan-cluster-service/deployment/pom.xml
b/extensions/infinispan-cluster-service/deployment/pom.xml
new file mode 100644
index 0000000000..8ca309b9d5
--- /dev/null
+++ b/extensions/infinispan-cluster-service/deployment/pom.xml
@@ -0,0 +1,74 @@
+<?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-infinispan-cluster-service-parent</artifactId>
+ <version>3.32.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+
<artifactId>camel-quarkus-infinispan-cluster-service-deployment</artifactId>
+ <name>Camel Quarkus :: Infinispan Cluster Service :: Deployment</name>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-core-deployment</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-core-cloud-deployment</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-infinispan-deployment</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-infinispan-cluster-service</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-junit5-internal</artifactId>
+ <scope>test</scope>
+ </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/infinispan-cluster-service/deployment/src/main/java/org/apache/camel/quarkus/component/infinispan/cluster/deployment/InfinispanClusterServiceProcessor.java
b/extensions/infinispan-cluster-service/deployment/src/main/java/org/apache/camel/quarkus/component/infinispan/cluster/deployment/InfinispanClusterServiceProcessor.java
new file mode 100644
index 0000000000..8d1a2c64ed
--- /dev/null
+++
b/extensions/infinispan-cluster-service/deployment/src/main/java/org/apache/camel/quarkus/component/infinispan/cluster/deployment/InfinispanClusterServiceProcessor.java
@@ -0,0 +1,39 @@
+/*
+ * 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.infinispan.cluster.deployment;
+
+import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.annotations.Consume;
+import io.quarkus.deployment.annotations.ExecutionTime;
+import io.quarkus.deployment.annotations.Record;
+import io.quarkus.runtime.RuntimeValue;
+import org.apache.camel.component.infinispan.cluster.InfinispanClusterService;
+import
org.apache.camel.quarkus.component.infinispan.cluster.InfinispanClusterServiceBuildTimeConfig;
+import
org.apache.camel.quarkus.component.infinispan.cluster.InfinispanClusterServiceRecorder;
+import org.apache.camel.quarkus.core.deployment.spi.CamelContextBuildItem;
+import org.apache.camel.quarkus.core.deployment.spi.CamelRuntimeBeanBuildItem;
+
+class InfinispanClusterServiceProcessor {
+ @BuildStep(onlyIf = InfinispanClusterServiceBuildTimeConfig.Enabled.class)
+ @Record(ExecutionTime.RUNTIME_INIT)
+ @Consume(CamelContextBuildItem.class)
+ CamelRuntimeBeanBuildItem
createInfinispanClusterService(InfinispanClusterServiceRecorder recorder) {
+ final RuntimeValue<InfinispanClusterService> clusterService =
recorder.createInfinispanClusterService();
+ return new CamelRuntimeBeanBuildItem("infinispanClusterService",
InfinispanClusterService.class.getName(),
+ clusterService);
+ }
+}
diff --git
a/extensions/infinispan-cluster-service/deployment/src/test/java/org/apache/camel/quarkus/component/infinispan/cluster/deployment/InfinispanClusterServiceConfigDefaultTest.java
b/extensions/infinispan-cluster-service/deployment/src/test/java/org/apache/camel/quarkus/component/infinispan/cluster/deployment/InfinispanClusterServiceConfigDefaultTest.java
new file mode 100644
index 0000000000..011bf5b658
--- /dev/null
+++
b/extensions/infinispan-cluster-service/deployment/src/test/java/org/apache/camel/quarkus/component/infinispan/cluster/deployment/InfinispanClusterServiceConfigDefaultTest.java
@@ -0,0 +1,74 @@
+/*
+ * 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.infinispan.cluster.deployment;
+
+import java.io.IOException;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.util.Properties;
+
+import io.quarkus.test.QuarkusUnitTest;
+import jakarta.inject.Inject;
+import org.apache.camel.CamelContext;
+import org.apache.camel.component.infinispan.cluster.InfinispanClusterService;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.asset.Asset;
+import org.jboss.shrinkwrap.api.asset.StringAsset;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+
+class InfinispanClusterServiceConfigDefaultTest {
+ @RegisterExtension
+ static final QuarkusUnitTest CONFIG = new QuarkusUnitTest()
+ .setArchiveProducer(() ->
ShrinkWrap.create(JavaArchive.class).addAsResource(applicationProperties(),
+ "application.properties"));
+
+ public static Asset applicationProperties() {
+ Writer writer = new StringWriter();
+
+ Properties props = new Properties();
+ // Disable Infinispan dev services
+ props.setProperty("quarkus.infinispan-client.devservices.enabled",
"false");
+
props.setProperty("quarkus.infinispan-client.devservices.create-default-client",
"false");
+ props.setProperty("quarkus.camel.cluster.infinispan.enabled", "false");
+
+ try {
+ props.store(writer, "");
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+
+ return new StringAsset(writer.toString());
+ }
+
+ @Inject
+ CamelContext camelContext;
+
+ @Test
+ void defaultConfigShouldNotAutoConfigure() {
+ InfinispanClusterService[] icss =
camelContext.getCamelContextExtension()
+ .getServices()
+ .stream()
+ .filter(s -> s instanceof InfinispanClusterService)
+ .toArray(InfinispanClusterService[]::new);
+ assertEquals(0, icss.length);
+ }
+
+}
diff --git
a/extensions/infinispan-cluster-service/deployment/src/test/java/org/apache/camel/quarkus/component/infinispan/cluster/deployment/InfinispanClusterServiceConfigEnabledTest.java
b/extensions/infinispan-cluster-service/deployment/src/test/java/org/apache/camel/quarkus/component/infinispan/cluster/deployment/InfinispanClusterServiceConfigEnabledTest.java
new file mode 100644
index 0000000000..eca89d0d2a
--- /dev/null
+++
b/extensions/infinispan-cluster-service/deployment/src/test/java/org/apache/camel/quarkus/component/infinispan/cluster/deployment/InfinispanClusterServiceConfigEnabledTest.java
@@ -0,0 +1,117 @@
+/*
+ * 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.infinispan.cluster.deployment;
+
+import java.io.IOException;
+import java.io.StringWriter;
+import java.io.Writer;
+import java.util.Properties;
+import java.util.concurrent.TimeUnit;
+
+import io.quarkus.test.QuarkusUnitTest;
+import jakarta.inject.Inject;
+import org.apache.camel.CamelContext;
+import
org.apache.camel.component.infinispan.remote.cluster.InfinispanRemoteClusterService;
+import org.jboss.shrinkwrap.api.ShrinkWrap;
+import org.jboss.shrinkwrap.api.asset.Asset;
+import org.jboss.shrinkwrap.api.asset.StringAsset;
+import org.jboss.shrinkwrap.api.spec.JavaArchive;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.RegisterExtension;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+class InfinispanClusterServiceConfigEnabledTest {
+ @RegisterExtension
+ static final QuarkusUnitTest CONFIG = new QuarkusUnitTest()
+ .setArchiveProducer(() ->
ShrinkWrap.create(JavaArchive.class).addAsResource(applicationProperties(),
+ "application.properties"));
+
+ public static Asset applicationProperties() {
+ Writer writer = new StringWriter();
+
+ Properties props = new Properties();
+ props.setProperty("quarkus.infinispan-client.devservices.enabled",
"false");
+
props.setProperty("quarkus.infinispan-client.devservices.create-default-client",
"false");
+ props.setProperty("quarkus.camel.cluster.infinispan.id",
"test-infinispan-cluster");
+ props.setProperty("quarkus.camel.cluster.infinispan.order", "100");
+ props.setProperty("quarkus.camel.cluster.infinispan.hosts",
"localhost:11222");
+ props.setProperty("quarkus.camel.cluster.infinispan.secure", "true");
+ props.setProperty("quarkus.camel.cluster.infinispan.username",
"testuser");
+ props.setProperty("quarkus.camel.cluster.infinispan.password",
"testpass");
+ props.setProperty("quarkus.camel.cluster.infinispan.sasl-mechanism",
"SCRAM-SHA-256");
+ props.setProperty("quarkus.camel.cluster.infinispan.security-realm",
"default");
+
props.setProperty("quarkus.camel.cluster.infinispan.security-server-name",
"infinispan");
+ props.setProperty("quarkus.camel.cluster.infinispan.lifespan", "60");
+
props.setProperty("quarkus.camel.cluster.infinispan.lifespan-time-unit",
"SECONDS");
+ props.setProperty("quarkus.camel.cluster.infinispan.attributes.attr1",
"value1");
+ props.setProperty("quarkus.camel.cluster.infinispan.attributes.attr2",
"value2");
+
props.setProperty("quarkus.camel.cluster.infinispan.configuration-properties.prop1",
"propvalue1");
+
props.setProperty("quarkus.camel.cluster.infinispan.configuration-properties.prop2",
"propvalue2");
+
+ try {
+ props.store(writer, "");
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+
+ return new StringAsset(writer.toString());
+ }
+
+ @Inject
+ CamelContext camelContext;
+
+ @Test
+ void enabledConfigShouldAutoConfigure() {
+ InfinispanRemoteClusterService[] icss =
camelContext.getCamelContextExtension()
+ .getServices()
+ .stream()
+ .filter(s -> s instanceof InfinispanRemoteClusterService)
+ .toArray(InfinispanRemoteClusterService[]::new);
+ assertEquals(1, icss.length);
+
+ InfinispanRemoteClusterService ics = icss[0];
+ assertNotNull(ics);
+
+ assertEquals("test-infinispan-cluster", ics.getId());
+ assertEquals(100, ics.getOrder());
+ assertEquals("localhost:11222", ics.getHosts());
+ assertTrue(ics.isSecure());
+ assertEquals("testuser", ics.getUsername());
+ assertEquals("testpass", ics.getPassword());
+ assertEquals("SCRAM-SHA-256", ics.getSaslMechanism());
+ assertEquals("default", ics.getSecurityRealm());
+ assertEquals("infinispan", ics.getSecurityServerName());
+ assertEquals(60L, ics.getLifespan());
+ assertEquals(TimeUnit.SECONDS, ics.getLifespanTimeUnit());
+
+ assertNotNull(ics.getAttributes());
+ assertTrue(ics.getAttributes().containsKey("attr1"));
+ assertEquals("value1", ics.getAttributes().get("attr1"));
+ assertTrue(ics.getAttributes().containsKey("attr2"));
+ assertEquals("value2", ics.getAttributes().get("attr2"));
+
+ assertNotNull(ics.getConfigurationProperties());
+ assertTrue(ics.getConfigurationProperties().containsKey("prop1"));
+ assertEquals("propvalue1",
ics.getConfigurationProperties().get("prop1"));
+ assertTrue(ics.getConfigurationProperties().containsKey("prop2"));
+ assertEquals("propvalue2",
ics.getConfigurationProperties().get("prop2"));
+ }
+
+}
diff --git a/extensions/infinispan-cluster-service/pom.xml
b/extensions/infinispan-cluster-service/pom.xml
new file mode 100644
index 0000000000..c93de57432
--- /dev/null
+++ b/extensions/infinispan-cluster-service/pom.xml
@@ -0,0 +1,37 @@
+<?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-extensions</artifactId>
+ <version>3.32.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-infinispan-cluster-service-parent</artifactId>
+ <name>Camel Quarkus :: Infinispan Cluster Service</name>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>deployment</module>
+ <module>runtime</module>
+ </modules>
+</project>
diff --git a/extensions/infinispan-cluster-service/runtime/pom.xml
b/extensions/infinispan-cluster-service/runtime/pom.xml
new file mode 100644
index 0000000000..7f9848f88b
--- /dev/null
+++ b/extensions/infinispan-cluster-service/runtime/pom.xml
@@ -0,0 +1,74 @@
+<?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-infinispan-cluster-service-parent</artifactId>
+ <version>3.32.0-SNAPSHOT</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-infinispan-cluster-service</artifactId>
+ <name>Camel Quarkus :: Infinispan Cluster Service :: Runtime</name>
+ <description>Provides an Infinispan implementation of the Camel Cluster
Service SPI</description>
+
+ <properties>
+ <camel.quarkus.jvmSince>3.32.0</camel.quarkus.jvmSince>
+ <camel.quarkus.nativeSince>3.32.0</camel.quarkus.nativeSince>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-core</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-core-cloud</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-infinispan</artifactId>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-extension-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/infinispan-cluster-service/runtime/src/main/doc/configuration.adoc
b/extensions/infinispan-cluster-service/runtime/src/main/doc/configuration.adoc
new file mode 100644
index 0000000000..cf3b55c9eb
--- /dev/null
+++
b/extensions/infinispan-cluster-service/runtime/src/main/doc/configuration.adoc
@@ -0,0 +1,32 @@
+=== Having only a single consumer in a cluster consuming from a given endpoint
+
+When the same route is deployed on multiple JVMs, it could be interesting to
use this extension in conjunction with the
xref:reference/extensions/master.adoc[Master one].
+In such a setup, a single consumer will be active at a time across the whole
camel master namespace.
+
+For instance, having the route below deployed on multiple JVMs:
+
+[source,java]
+----
+from("master:ns:timer:test?period=100")
+ .log("Timer invoked on a single JVM at a time");
+----
+
+As a result, a single consumer will be active across the `ns` camel master
namespace.
+It means that, at a given time, only a single timer will generate exchanges
across all JVMs.
+In other words, messages will be logged every 100ms on a single JVM at a time.
+
+==== Infinispan Configuration
+
+You can configure the Infinispan client with the various
`quarkus.camel.cluster.infinispan` configuration options in
`application.properties.
+
+[source,properties]
+----
+
+quarkus.camel.cluster.infinispan.hosts=localhost:11222
+quarkus.camel.cluster.infinispan.username=admin
+quarkus.camel.cluster.infinispan.password=2s3cr3t
+
+# Optional additional configuration properties
+quarkus.camel.cluster.infinispan.configuration-properties."infinispan.client.hotrod.client_intelligence"
= BASIC
+quarkus.camel.cluster.infinispan.configuration-properties."infinispan.client.hotrod.connect_timeout"
= 5000
+----
diff --git
a/extensions/infinispan-cluster-service/runtime/src/main/java/org/apache/camel/quarkus/component/infinispan/cluster/InfinispanClusterServiceBuildTimeConfig.java
b/extensions/infinispan-cluster-service/runtime/src/main/java/org/apache/camel/quarkus/component/infinispan/cluster/InfinispanClusterServiceBuildTimeConfig.java
new file mode 100644
index 0000000000..ec04c36ab2
--- /dev/null
+++
b/extensions/infinispan-cluster-service/runtime/src/main/java/org/apache/camel/quarkus/component/infinispan/cluster/InfinispanClusterServiceBuildTimeConfig.java
@@ -0,0 +1,47 @@
+/*
+ * 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.infinispan.cluster;
+
+import java.util.function.BooleanSupplier;
+
+import io.quarkus.runtime.annotations.ConfigPhase;
+import io.quarkus.runtime.annotations.ConfigRoot;
+import io.smallrye.config.ConfigMapping;
+import io.smallrye.config.WithDefault;
+
+/**
+ * Build time configuration options for Infinispan Cluster Service.
+ */
+@ConfigRoot(phase = ConfigPhase.BUILD_AND_RUN_TIME_FIXED)
+@ConfigMapping(prefix = "quarkus.camel.cluster.infinispan")
+public interface InfinispanClusterServiceBuildTimeConfig {
+ /**
+ * Whether an Infinispan Cluster Service should be automatically
configured according to
+ * 'quarkus.camel.cluster.infinispan.++*++' configurations.
+ */
+ @WithDefault("true")
+ boolean enabled();
+
+ final class Enabled implements BooleanSupplier {
+ InfinispanClusterServiceBuildTimeConfig config;
+
+ @Override
+ public boolean getAsBoolean() {
+ return config.enabled();
+ }
+ }
+}
diff --git
a/extensions/infinispan-cluster-service/runtime/src/main/java/org/apache/camel/quarkus/component/infinispan/cluster/InfinispanClusterServiceRecorder.java
b/extensions/infinispan-cluster-service/runtime/src/main/java/org/apache/camel/quarkus/component/infinispan/cluster/InfinispanClusterServiceRecorder.java
new file mode 100644
index 0000000000..1c20ed8dfb
--- /dev/null
+++
b/extensions/infinispan-cluster-service/runtime/src/main/java/org/apache/camel/quarkus/component/infinispan/cluster/InfinispanClusterServiceRecorder.java
@@ -0,0 +1,55 @@
+/*
+ * 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.infinispan.cluster;
+
+import io.quarkus.runtime.RuntimeValue;
+import io.quarkus.runtime.annotations.Recorder;
+import org.apache.camel.component.infinispan.cluster.InfinispanClusterService;
+import
org.apache.camel.component.infinispan.remote.cluster.InfinispanRemoteClusterService;
+import org.infinispan.commons.marshall.ProtoStreamMarshaller;
+
+@Recorder
+public class InfinispanClusterServiceRecorder {
+ private final RuntimeValue<InfinispanClusterServiceRuntimeConfig> config;
+
+ public
InfinispanClusterServiceRecorder(RuntimeValue<InfinispanClusterServiceRuntimeConfig>
config) {
+ this.config = config;
+ }
+
+ public RuntimeValue<InfinispanClusterService>
createInfinispanClusterService() {
+ InfinispanRemoteClusterService clusterService = new
InfinispanRemoteClusterService();
+ InfinispanClusterServiceRuntimeConfig config = this.config.getValue();
+ config.id().ifPresent(clusterService::setId);
+ config.order().ifPresent(clusterService::setOrder);
+
config.configurationUri().ifPresent(clusterService::setConfigurationUri);
+ config.hosts().ifPresent(clusterService::setHosts);
+ config.secure().ifPresent(clusterService::setSecure);
+ config.username().ifPresent(clusterService::setUsername);
+ config.password().ifPresent(clusterService::setPassword);
+ config.saslMechanism().ifPresent(clusterService::setSaslMechanism);
+ config.securityRealm().ifPresent(clusterService::setSecurityRealm);
+
config.securityServerName().ifPresent(clusterService::setSecurityServerName);
+ clusterService.setLifespanTimeUnit(config.lifespanTimeUnit());
+ clusterService.setLifespan(config.lifespan());
+ config.attributes().forEach(clusterService::setAttribute);
+
config.configurationProperties().putIfAbsent("infinispan.client.hotrod.marshaller",
+ ProtoStreamMarshaller.class.getName());
+
clusterService.setConfigurationProperties(config.configurationProperties());
+
+ return new RuntimeValue<>(clusterService);
+ }
+}
diff --git
a/extensions/infinispan-cluster-service/runtime/src/main/java/org/apache/camel/quarkus/component/infinispan/cluster/InfinispanClusterServiceRuntimeConfig.java
b/extensions/infinispan-cluster-service/runtime/src/main/java/org/apache/camel/quarkus/component/infinispan/cluster/InfinispanClusterServiceRuntimeConfig.java
new file mode 100644
index 0000000000..ece3d851f8
--- /dev/null
+++
b/extensions/infinispan-cluster-service/runtime/src/main/java/org/apache/camel/quarkus/component/infinispan/cluster/InfinispanClusterServiceRuntimeConfig.java
@@ -0,0 +1,105 @@
+/*
+ * 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.infinispan.cluster;
+
+import java.util.Map;
+import java.util.Optional;
+import java.util.concurrent.TimeUnit;
+
+import io.quarkus.runtime.annotations.ConfigPhase;
+import io.quarkus.runtime.annotations.ConfigRoot;
+import io.smallrye.config.ConfigMapping;
+import io.smallrye.config.WithDefault;
+
+/**
+ * Runtime configuration options for Infinispan Cluster Service.
+ */
+@ConfigRoot(phase = ConfigPhase.RUN_TIME)
+@ConfigMapping(prefix = "quarkus.camel.cluster.infinispan")
+public interface InfinispanClusterServiceRuntimeConfig {
+ /**
+ * The cluster service ID.
+ */
+ Optional<String> id();
+
+ /**
+ * The service lookup order/priority.
+ */
+ Optional<Integer> order();
+
+ /**
+ * The custom attributes associated to the service.
+ */
+ Map<String, String> attributes();
+
+ /**
+ * The Infinispan configuration URI. Can be used to specify a custom
Infinispan configuration file.
+ */
+ Optional<String> configurationUri();
+
+ /**
+ * The Infinispan server hosts (e.g., "localhost:11222").
+ */
+ Optional<String> hosts();
+
+ /**
+ * Enable secure connections to an Infinispan server.
+ */
+ Optional<Boolean> secure();
+
+ /**
+ * Username for authentication with the Infinispan server.
+ */
+ Optional<String> username();
+
+ /**
+ * Password for authentication with the Infinispan server.
+ */
+ Optional<String> password();
+
+ /**
+ * SASL mechanism for authentication (e.g., DIGEST-MD5, PLAIN,
SCRAM-SHA-256).
+ */
+ Optional<String> saslMechanism();
+
+ /**
+ * Security realm for authentication.
+ */
+ Optional<String> securityRealm();
+
+ /**
+ * Security server name for authentication.
+ */
+ Optional<String> securityServerName();
+
+ /**
+ * Additional configuration properties for the Infinispan client.
+ */
+ Map<String, String> configurationProperties();
+
+ /**
+ * Lifespan for entries in the cluster view cache.
+ */
+ @WithDefault("30")
+ Long lifespan();
+
+ /**
+ * Time unit for lifespan (e.g., SECONDS, MINUTES, HOURS).
+ */
+ @WithDefault("SECONDS")
+ TimeUnit lifespanTimeUnit();
+}
diff --git
a/extensions/infinispan-cluster-service/runtime/src/main/resources/META-INF/quarkus-extension.yaml
b/extensions/infinispan-cluster-service/runtime/src/main/resources/META-INF/quarkus-extension.yaml
new file mode 100644
index 0000000000..c90f89c3e4
--- /dev/null
+++
b/extensions/infinispan-cluster-service/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -0,0 +1,35 @@
+#
+# 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 Infinispan Cluster Service"
+description: "Provides an Infinispan implementation of the Camel Cluster
Service SPI"
+metadata:
+ icon-url:
"https://raw.githubusercontent.com/apache/camel-website/main/antora-ui-camel/src/img/logo-d.svg"
+ sponsor: "Apache Software Foundation"
+ guide:
"https://camel.apache.org/camel-quarkus/latest/reference/extensions/infinispan-cluster-service.html"
+ categories:
+ - "integration"
+ config:
+ - "quarkus.camel.cluster.infinispan"
+ status:
+ - "stable"
diff --git a/extensions/pom.xml b/extensions/pom.xml
index 7816c06180..bec08d0727 100644
--- a/extensions/pom.xml
+++ b/extensions/pom.xml
@@ -142,6 +142,7 @@
<module>ibm-cos</module>
<module>ical</module>
<module>infinispan</module>
+ <module>infinispan-cluster-service</module>
<module>influxdb</module>
<module>iso8583</module>
<module>jackson</module>
diff --git a/integration-tests/master-infinispan/pom.xml
b/integration-tests/master-infinispan/pom.xml
new file mode 100644
index 0000000000..b19b06c246
--- /dev/null
+++ b/integration-tests/master-infinispan/pom.xml
@@ -0,0 +1,273 @@
+<?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-it</artifactId>
+ <version>3.32.0-SNAPSHOT</version>
+ <relativePath>../../poms/build-parent-it/pom.xml</relativePath>
+ </parent>
+
+ <artifactId>camel-quarkus-integration-test-master-infinispan</artifactId>
+ <name>Camel Quarkus :: Integration Tests :: Master With Infinispan</name>
+ <description>Integration tests for Camel Quarkus Master extension with
Infinispan</description>
+
+ <properties>
+
<quarkus.runner>${project.build.directory}/quarkus-app/quarkus-run.jar</quarkus.runner>
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-file</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-infinispan</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-infinispan-cluster-service</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-master</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-microprofile-health</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-timer</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy</artifactId>
+ </dependency>
+
+ <!-- test dependencies -->
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-junit</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>io.rest-assured</groupId>
+ <artifactId>rest-assured</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+
<artifactId>camel-quarkus-integration-tests-process-executor-support</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.awaitility</groupId>
+ <artifactId>awaitility</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.testcontainers</groupId>
+ <artifactId>testcontainers</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.infinispan</groupId>
+ <artifactId>testcontainers-infinispan</artifactId>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <id>full</id>
+ <activation>
+ <property>
+ <name>!quickly</name>
+ </property>
+ </activation>
+ <build>
+ <plugins>
+ <plugin>
+ <!-- Move surefire:test to integration-test phase to
be able to run
+ java -jar target/*runner.jar from a test -->
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>default-test</id>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <phase>integration-test</phase>
+ <configuration>
+ <systemPropertyVariables>
+
<quarkus.runner>${quarkus.runner}</quarkus.runner>
+ </systemPropertyVariables>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>native</id>
+ <activation>
+ <property>
+ <name>native</name>
+ </property>
+ </activation>
+ <properties>
+ <quarkus.native.enabled>true</quarkus.native.enabled>
+
<quarkus.runner>${project.build.directory}/${project.artifactId}-${project.version}-runner</quarkus.runner>
+ </properties>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>integration-test</goal>
+ <goal>verify</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <systemPropertyVariables>
+
<quarkus.runner>${quarkus.runner}</quarkus.runner>
+ </systemPropertyVariables>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>virtualDependencies</id>
+ <activation>
+ <property>
+ <name>!noVirtualDependencies</name>
+ </property>
+ </activation>
+ <dependencies>
+ <!-- The following dependencies guarantee that this module is
built after them. You can update them by running `mvn process-resources
-Pformat -N` from the source tree root directory -->
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-file-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+
<artifactId>camel-quarkus-infinispan-cluster-service-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+
<artifactId>camel-quarkus-infinispan-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-master-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+
<artifactId>camel-quarkus-microprofile-health-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-timer-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+ </profile>
+ <profile>
+ <id>skip-testcontainers-tests</id>
+ <activation>
+ <property>
+ <name>skip-testcontainers-tests</name>
+ </property>
+ </activation>
+ <properties>
+ <skipTests>true</skipTests>
+ </properties>
+ </profile>
+ </profiles>
+
+</project>
+
diff --git
a/integration-tests/master-infinispan/src/main/java/org/apache/camel/quarkus/component/master/it/InfinispanClusterServiceResource.java
b/integration-tests/master-infinispan/src/main/java/org/apache/camel/quarkus/component/master/it/InfinispanClusterServiceResource.java
new file mode 100644
index 0000000000..ae99e83e68
--- /dev/null
+++
b/integration-tests/master-infinispan/src/main/java/org/apache/camel/quarkus/component/master/it/InfinispanClusterServiceResource.java
@@ -0,0 +1,35 @@
+/*
+ * 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.master.it;
+
+import jakarta.inject.Inject;
+import jakarta.ws.rs.GET;
+import jakarta.ws.rs.Path;
+import org.apache.camel.CamelContext;
+
+@Path("/infinispan/cluster/service")
+public class InfinispanClusterServiceResource {
+
+ @Inject
+ CamelContext camelContext;
+
+ @Path("/route/stop/leader")
+ @GET
+ public void stopLeaderRoute() throws Exception {
+ camelContext.getRouteController().stopRoute("leader");
+ }
+}
diff --git
a/integration-tests/master-infinispan/src/main/java/org/apache/camel/quarkus/component/master/it/InfinispanClusterServiceRoutes.java
b/integration-tests/master-infinispan/src/main/java/org/apache/camel/quarkus/component/master/it/InfinispanClusterServiceRoutes.java
new file mode 100644
index 0000000000..36edf79f2b
--- /dev/null
+++
b/integration-tests/master-infinispan/src/main/java/org/apache/camel/quarkus/component/master/it/InfinispanClusterServiceRoutes.java
@@ -0,0 +1,39 @@
+/*
+ * 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.master.it;
+
+import jakarta.enterprise.context.ApplicationScoped;
+import org.apache.camel.Exchange;
+import org.apache.camel.builder.RouteBuilder;
+import org.eclipse.microprofile.config.inject.ConfigProperty;
+
+@ApplicationScoped
+public class InfinispanClusterServiceRoutes extends RouteBuilder {
+ @ConfigProperty(name = "application.id")
+ String applicationId;
+
+ @Override
+ public void configure() {
+ // Increment counter when this instance is the cluster leader
+ from("master:infinispan-cluster-test:timer:test?period=10000")
+ .id("leader")
+ .setBody(constant("leader"))
+ .setHeader(Exchange.FILE_NAME,
constant(String.format("%s.txt", applicationId)))
+ .log(String.format("Application %s is writing into file",
applicationId))
+ .to("file:target/cluster/");
+ }
+}
diff --git
a/integration-tests/master-infinispan/src/main/resources/application.properties
b/integration-tests/master-infinispan/src/main/resources/application.properties
new file mode 100644
index 0000000000..26eb4c3b0a
--- /dev/null
+++
b/integration-tests/master-infinispan/src/main/resources/application.properties
@@ -0,0 +1,23 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+camel.context.name = master-infinispan
+application.id = leader
+
+quarkus.infinispan-client.devservices.enabled=false
+quarkus.camel.cluster.infinispan.id = infinispan-cluster-service
+quarkus.camel.cluster.infinispan.configuration-properties."infinispan.client.hotrod.client_intelligence"
= BASIC
diff --git
a/integration-tests/master-infinispan/src/test/java/org/apache/camel/quarkus/component/master/it/InfinispanClusterServiceIT.java
b/integration-tests/master-infinispan/src/test/java/org/apache/camel/quarkus/component/master/it/InfinispanClusterServiceIT.java
new file mode 100644
index 0000000000..8352c38216
--- /dev/null
+++
b/integration-tests/master-infinispan/src/test/java/org/apache/camel/quarkus/component/master/it/InfinispanClusterServiceIT.java
@@ -0,0 +1,23 @@
+/*
+ * 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.master.it;
+
+import io.quarkus.test.junit.QuarkusIntegrationTest;
+
+@QuarkusIntegrationTest
+class InfinispanClusterServiceIT extends InfinispanClusterServiceTest {
+}
diff --git
a/integration-tests/master-infinispan/src/test/java/org/apache/camel/quarkus/component/master/it/InfinispanClusterServiceTest.java
b/integration-tests/master-infinispan/src/test/java/org/apache/camel/quarkus/component/master/it/InfinispanClusterServiceTest.java
new file mode 100644
index 0000000000..25f3600ffa
--- /dev/null
+++
b/integration-tests/master-infinispan/src/test/java/org/apache/camel/quarkus/component/master/it/InfinispanClusterServiceTest.java
@@ -0,0 +1,117 @@
+/*
+ * 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.master.it;
+
+import java.io.IOException;
+import java.nio.charset.StandardCharsets;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.concurrent.TimeUnit;
+
+import io.quarkus.test.common.QuarkusTestResource;
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.RestAssured;
+import org.apache.camel.quarkus.test.support.process.QuarkusProcessExecutor;
+import org.apache.commons.io.FileUtils;
+import org.awaitility.Awaitility;
+import org.eclipse.microprofile.config.Config;
+import org.eclipse.microprofile.config.ConfigProvider;
+import org.junit.jupiter.api.AfterEach;
+import org.junit.jupiter.api.Test;
+import org.zeroturnaround.exec.StartedProcess;
+
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.emptyString;
+
+@QuarkusTest
+@QuarkusTestResource(InfinispanClusterServiceTestResource.class)
+class InfinispanClusterServiceTest {
+ @AfterEach
+ public void deleteClusterFiles() throws IOException {
+ FileUtils.deleteDirectory(Paths.get("target/cluster/").toFile());
+ }
+
+ @Test
+ void testFailover() throws IOException {
+ // Verify that this process is the cluster leader
+ Awaitility.await().atMost(10, TimeUnit.SECONDS).with().until(() -> {
+ return readLeaderFile("leader").equals("leader");
+ });
+
+ List<String> jvmArgs = new ArrayList<>();
+ jvmArgs.add("-Dapplication.id=follower");
+
+ // Copy quarkus.camel.cluster.infinispan configuration to the follower
application
+ Config config = ConfigProvider.getConfig();
+ for (String configName : config.getPropertyNames()) {
+ if (configName.startsWith("quarkus.camel.cluster.infinispan")) {
+ String configValue = config.getValue(configName, String.class);
+ jvmArgs.add("-D%s=%s".formatted(configName, configValue));
+ }
+ }
+
+ // Start secondary application process
+ QuarkusProcessExecutor quarkusProcessExecutor = new
QuarkusProcessExecutor(jvmArgs.toArray(String[]::new));
+ StartedProcess process = quarkusProcessExecutor.start();
+
+ // Wait until the process is fully initialized
+ awaitStartup(quarkusProcessExecutor);
+
+ try {
+ // Verify the follower hasn't taken the leader role
+ assertThat(readLeaderFile("follower"), emptyString());
+
+ // Stop camel leader route to trigger fail-over
+
RestAssured.get("/infinispan/cluster/service/route/stop/leader").then().statusCode(204);
+
+ // Verify that the secondary application has been elected as the
+ // cluster leader
+ Awaitility.await().atMost(10, TimeUnit.SECONDS).until(() -> {
+ return readLeaderFile("follower").equals("leader");
+ });
+ } finally {
+ if (process != null && process.getProcess().isAlive()) {
+ quarkusProcessExecutor.destroy();
+ }
+ }
+ }
+
+ private void awaitStartup(QuarkusProcessExecutor quarkusProcessExecutor) {
+ Awaitility.await().atMost(10, TimeUnit.SECONDS).pollDelay(1,
TimeUnit.SECONDS).until(() -> {
+ return isApplicationHealthy(quarkusProcessExecutor.getHttpPort());
+ });
+ }
+
+ private boolean isApplicationHealthy(int port) {
+ try {
+ int status =
RestAssured.given().port(port).get("/q/health").then().extract().statusCode();
+ return status == 200;
+ } catch (Exception e) {
+ return false;
+ }
+ }
+
+ private String readLeaderFile(String fileName) throws IOException {
+ Path path = Paths.get(String.format("target/cluster/%s.txt",
fileName));
+ if (path.toFile().exists()) {
+ return FileUtils.readFileToString(path.toFile(),
StandardCharsets.UTF_8);
+ }
+ return "";
+ }
+}
diff --git
a/integration-tests/master-infinispan/src/test/java/org/apache/camel/quarkus/component/master/it/InfinispanClusterServiceTestResource.java
b/integration-tests/master-infinispan/src/test/java/org/apache/camel/quarkus/component/master/it/InfinispanClusterServiceTestResource.java
new file mode 100644
index 0000000000..b40829dae7
--- /dev/null
+++
b/integration-tests/master-infinispan/src/test/java/org/apache/camel/quarkus/component/master/it/InfinispanClusterServiceTestResource.java
@@ -0,0 +1,75 @@
+/*
+ * 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.master.it;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import io.quarkus.test.common.QuarkusTestResourceLifecycleManager;
+import org.eclipse.microprofile.config.ConfigProvider;
+import org.infinispan.client.hotrod.impl.ConfigurationProperties;
+import org.infinispan.testcontainers.InfinispanContainer;
+import org.testcontainers.DockerClientFactory;
+import org.testcontainers.containers.BindMode;
+import org.testcontainers.containers.GenericContainer;
+import org.testcontainers.containers.wait.strategy.Wait;
+import org.testcontainers.utility.DockerImageName;
+
+public class InfinispanClusterServiceTestResource implements
QuarkusTestResourceLifecycleManager {
+ private static final String INFINISPAN_IMAGE =
ConfigProvider.getConfig().getValue("infinispan.container.image",
+ String.class);
+ private static final String USER = "camel";
+ private static final String PASS = "2s3cr3t";
+ private GenericContainer<?> container;
+
+ @Override
+ public Map<String, String> start() {
+ DockerImageName dockerImageName =
DockerImageName.parse(INFINISPAN_IMAGE);
+ container = new InfinispanContainer(dockerImageName)
+ .withExposedPorts(ConfigurationProperties.DEFAULT_HOTROD_PORT)
+ .withUser(USER)
+ .withPassword(PASS)
+
.withClasspathResourceMapping("infinispan-cluster-service.xml",
"/user-config/infinispan-cluster-service.xml",
+ BindMode.READ_ONLY)
+ .withCommand(
+ "-c", "infinispan.xml",
+ "-c", "/user-config/infinispan-cluster-service.xml")
+ .waitingFor(Wait.forLogMessage(".*Infinispan
Server.*started.*", 1));
+
+ container.start();
+
+ Map<String, String> config = new HashMap<>();
+ String host = String.format("%s:%d",
DockerClientFactory.instance().dockerHostIpAddress(),
+
container.getMappedPort(ConfigurationProperties.DEFAULT_HOTROD_PORT));
+ config.put("quarkus.camel.cluster.infinispan.hosts", host);
+ config.put("quarkus.camel.cluster.infinispan.username", USER);
+ config.put("quarkus.camel.cluster.infinispan.password", PASS);
+ config.put("quarkus.camel.cluster.infinispan.secure", "true");
+ config.put("quarkus.camel.cluster.infinispan.security-realm",
"default");
+ config.put("quarkus.camel.cluster.infinispan.sasl-mechanism",
"SCRAM-SHA-512");
+ config.put("quarkus.camel.cluster.infinispan.security-server-name",
"infinispan");
+
+ return config;
+ }
+
+ @Override
+ public void stop() {
+ if (container != null) {
+ container.stop();
+ }
+ }
+}
diff --git
a/integration-tests/master-infinispan/src/test/resources/infinispan-cluster-service.xml
b/integration-tests/master-infinispan/src/test/resources/infinispan-cluster-service.xml
new file mode 100644
index 0000000000..2241734ab3
--- /dev/null
+++
b/integration-tests/master-infinispan/src/test/resources/infinispan-cluster-service.xml
@@ -0,0 +1,21 @@
+<!--
+
+ 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.
+
+-->
+<distributed-cache name="infinispan-cluster-test">
+ <encoding media-type="application/x-protostream" />
+</distributed-cache>
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
index f69ff0e2ce..38bce81dca 100644
--- a/integration-tests/pom.xml
+++ b/integration-tests/pom.xml
@@ -170,6 +170,7 @@
<module>management</module>
<module>mapstruct</module>
<module>master-file</module>
+ <module>master-infinispan</module>
<module>master-openshift</module>
<module>mdc</module>
<module>micrometer</module>
diff --git a/pom.xml b/pom.xml
index 4b7227b385..ac9bc98355 100644
--- a/pom.xml
+++ b/pom.xml
@@ -254,6 +254,7 @@
<greenmail.container.image>mirror.gcr.io/greenmail/standalone:2.1.8</greenmail.container.image>
<hashicorp-vault.container.image>mirror.gcr.io/hashicorp/vault:1.20.4</hashicorp-vault.container.image>
<ibm-mq.container.image>icr.io/ibm-messaging/mq:9.4.3.0-r1</ibm-mq.container.image>
+
<infinispan.container.image>quay.io/infinispan/server:latest</infinispan.container.image><!--
@sync io.quarkus:quarkus-build-parent:${quarkus.version} prop:infinispan.image
-->
<influxdb.container.image>mirror.gcr.io/influxdb:1.12.2-alpine</influxdb.container.image>
<kafka.container.image>quay.io/strimzi-test-container/test-container:0.114.0-kafka-4.1.0</kafka.container.image>
<keycloak.container.image>quay.io/keycloak/keycloak:${keycloak.version}</keycloak.container.image>
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index f6a2ce14b3..5e74a669a3 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -4821,6 +4821,16 @@
<artifactId>camel-quarkus-infinispan</artifactId>
<version>${camel-quarkus.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+
<artifactId>camel-quarkus-infinispan-cluster-service</artifactId>
+ <version>${camel-quarkus.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+
<artifactId>camel-quarkus-infinispan-cluster-service-deployment</artifactId>
+ <version>${camel-quarkus.version}</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-infinispan-deployment</artifactId>
diff --git a/poms/bom/src/main/generated/flattened-full-pom.xml
b/poms/bom/src/main/generated/flattened-full-pom.xml
index bcacc7cb45..d0f27eb35d 100644
--- a/poms/bom/src/main/generated/flattened-full-pom.xml
+++ b/poms/bom/src/main/generated/flattened-full-pom.xml
@@ -4706,6 +4706,16 @@
<artifactId>camel-quarkus-infinispan</artifactId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>3.32.0-SNAPSHOT</version><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>camel-quarkus-infinispan-cluster-service</artifactId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <version>3.32.0-SNAPSHOT</version><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+
<artifactId>camel-quarkus-infinispan-cluster-service-deployment</artifactId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <version>3.32.0-SNAPSHOT</version><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<artifactId>camel-quarkus-infinispan-deployment</artifactId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
diff --git a/poms/bom/src/main/generated/flattened-reduced-pom.xml
b/poms/bom/src/main/generated/flattened-reduced-pom.xml
index 0d4d5de026..1f51846150 100644
--- a/poms/bom/src/main/generated/flattened-reduced-pom.xml
+++ b/poms/bom/src/main/generated/flattened-reduced-pom.xml
@@ -4685,6 +4685,16 @@
<artifactId>camel-quarkus-infinispan</artifactId>
<version>3.32.0-SNAPSHOT</version>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-infinispan-cluster-service</artifactId>
+ <version>3.32.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+
<artifactId>camel-quarkus-infinispan-cluster-service-deployment</artifactId>
+ <version>3.32.0-SNAPSHOT</version>
+ </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-infinispan-deployment</artifactId>
diff --git a/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml
b/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml
index 3d143e622a..b2a957938f 100644
--- a/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml
+++ b/poms/bom/src/main/generated/flattened-reduced-verbose-pom.xml
@@ -4685,6 +4685,16 @@
<artifactId>camel-quarkus-infinispan</artifactId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<version>3.32.0-SNAPSHOT</version><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <artifactId>camel-quarkus-infinispan-cluster-service</artifactId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <version>3.32.0-SNAPSHOT</version><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+
<artifactId>camel-quarkus-infinispan-cluster-service-deployment</artifactId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ <version>3.32.0-SNAPSHOT</version><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
+ </dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
<artifactId>camel-quarkus-infinispan-deployment</artifactId><!--
org.apache.camel.quarkus:camel-quarkus-bom:${project.version} -->
diff --git a/tooling/scripts/test-categories.yaml
b/tooling/scripts/test-categories.yaml
index c3dcb50302..0203c20f52 100644
--- a/tooling/scripts/test-categories.yaml
+++ b/tooling/scripts/test-categories.yaml
@@ -25,6 +25,7 @@ group-01:
- http-grouped
- infinispan
- infinispan-quarkus-client
+ - master-infinispan
- jcache
- jms-artemis-client
- jms-artemis-ra
diff --git a/tooling/test-list/pom.xml b/tooling/test-list/pom.xml
index 1b284848bc..14f6ae5278 100644
--- a/tooling/test-list/pom.xml
+++ b/tooling/test-list/pom.xml
@@ -59,6 +59,7 @@
<exclude>support/**/*</exclude>
<exclude>master-openshift/pom.xml</exclude>
<exclude>master-file/pom.xml</exclude>
+ <exclude>master-infinispan/pom.xml</exclude>
<exclude>main-command-mode/pom.xml</exclude>
<exclude>main-unknown-args-fail/pom.xml</exclude>
<exclude>main-unknown-args-ignore/pom.xml</exclude>