You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by pp...@apache.org on 2020/12/23 18:46:02 UTC
[camel-quarkus] branch master updated: Hazelcast native support
fixes #1647
This is an automated email from the ASF dual-hosted git repository.
ppalaga pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
The following commit(s) were added to refs/heads/master by this push:
new b1812d9 Hazelcast native support fixes #1647
b1812d9 is described below
commit b1812d939bda05650d6a2fbcb5fa2e4cd0473e01
Author: Zineb Bendhiba <be...@gmail.com>
AuthorDate: Fri Oct 30 11:43:48 2020 +0100
Hazelcast native support fixes #1647
---
.../ROOT/pages/reference/extensions/hazelcast.adoc | 48 ++++-
.../components/hazelcast-atomicvalue.adoc | 6 +-
.../reference/components/hazelcast-instance.adoc | 6 +-
.../reference/components/hazelcast-list.adoc | 6 +-
.../reference/components/hazelcast-map.adoc | 6 +-
.../reference/components/hazelcast-multimap.adoc | 6 +-
.../reference/components/hazelcast-queue.adoc | 6 +-
.../components/hazelcast-replicatedmap.adoc | 6 +-
.../reference/components/hazelcast-ringbuffer.adoc | 6 +-
.../reference/components/hazelcast-seda.adoc | 6 +-
.../reference/components/hazelcast-set.adoc | 6 +-
.../reference/components/hazelcast-topic.adoc | 6 +-
.../hazelcast/deployment/HazelcastProcessor.java | 46 -----
extensions-jvm/hazelcast/integration-test/pom.xml | 78 --------
.../component/hazelcast/it/HazelcastResource.java | 181 ------------------
.../component/hazelcast/it/HazelcastTest.java | 114 ------------
extensions-jvm/pom.xml | 1 -
.../hazelcast/deployment/pom.xml | 4 +
.../hazelcast/deployment/HazelcastProcessor.java | 113 ++++++++++++
{extensions-jvm => extensions}/hazelcast/pom.xml | 1 -
.../hazelcast/runtime/pom.xml | 21 +++
.../runtime/src/main/doc/configuration.adoc | 30 +++
.../hazelcast/runtime/HazelcastSubstitutions.java | 44 +++++
.../main/resources/META-INF/quarkus-extension.yaml | 3 +-
extensions/pom.xml | 1 +
integration-tests/hazelcast/pom.xml | 154 ++++++++++++++++
.../it/AbstractHazelcastCollectionResource.java | 124 +++++++++++++
.../hazelcast/it/AbstractHazelcastMapResource.java | 141 ++++++++++++++
.../hazelcast/it/HazelcastAtomicResource.java | 87 +++++++++
.../hazelcast/it/HazelcastListResource.java | 73 ++++++++
.../hazelcast/it/HazelcastMapResource.java | 118 ++++++++++++
.../hazelcast/it/HazelcastMultimapResource.java | 71 +++++++
.../it/HazelcastReplicatedMapResource.java | 42 +++++
.../component/hazelcast/it/HazelcastRoutes.java | 189 +++++++++++++++++++
.../hazelcast/it/HazelcastSetResource.java | 42 +++++
.../hazelcast/it/HazelcastTopicResource.java | 68 +++++++
.../hazelcast/it/model/HazelcastMapRequest.java | 77 ++++++++
.../component/hazelcast/it/HazelcastAtomicIT.java | 24 +++
.../hazelcast/it/HazelcastAtomicTest.java | 71 +++++++
.../component/hazelcast/it/HazelcastListIT.java | 23 +++
.../component/hazelcast/it/HazelcastListTest.java | 153 +++++++++++++++
.../component/hazelcast/it/HazelcastMapIT.java | 23 +++
.../component/hazelcast/it/HazelcastMapTest.java | 205 +++++++++++++++++++++
.../hazelcast/it/HazelcastMultimapIT.java | 23 +++
.../hazelcast/it/HazelcastMultimapTest.java | 182 ++++++++++++++++++
.../hazelcast/it/HazelcastReplicatedmapTest.java | 124 +++++++++++++
.../component/hazelcast/it/HazelcastSetIT.java | 23 +++
.../component/hazelcast/it/HazelcastSetTest.java | 129 +++++++++++++
.../component/hazelcast/it/HazelcastTopicIT.java | 23 +++
.../component/hazelcast/it/HazelcastTopicTest.java | 54 ++++++
integration-tests/pom.xml | 1 +
pom.xml | 2 +
poms/bom-test/pom.xml | 5 +
poms/bom/pom.xml | 17 ++
tooling/scripts/test-categories.yaml | 1 +
55 files changed, 2560 insertions(+), 460 deletions(-)
diff --git a/docs/modules/ROOT/pages/reference/extensions/hazelcast.adoc b/docs/modules/ROOT/pages/reference/extensions/hazelcast.adoc
index 7f1b57c..67960dc 100644
--- a/docs/modules/ROOT/pages/reference/extensions/hazelcast.adoc
+++ b/docs/modules/ROOT/pages/reference/extensions/hazelcast.adoc
@@ -2,15 +2,15 @@
// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
= Hazelcast Atomic Number
:cq-artifact-id: camel-quarkus-hazelcast
-:cq-native-supported: false
-:cq-status: Preview
+:cq-native-supported: true
+:cq-status: Stable
:cq-description: Increment, decrement, set, etc. Hazelcast atomic number (a grid wide number).
:cq-deprecated: false
:cq-jvm-since: 1.1.0
-:cq-native-since: n/a
+:cq-native-since: 1.6.0
[.badges]
-[.badge-key]##JVM since##[.badge-supported]##1.1.0## [.badge-key]##Native##[.badge-unsupported]##unsupported##
+[.badge-key]##JVM since##[.badge-supported]##1.1.0## [.badge-key]##Native since##[.badge-supported]##1.6.0##
Increment, decrement, set, etc. Hazelcast atomic number (a grid wide number).
@@ -41,3 +41,43 @@ Please refer to the above links for usage and configuration details.
----
Check the xref:user-guide/index.adoc[User guide] for more information about writing Camel Quarkus applications.
+
+== SSL in native mode
+
+This extension auto-enables SSL support in native mode. Hence you do not need to add
+`quarkus.ssl.native=true` to your `application.properties` yourself. See also
+https://quarkus.io/guides/native-and-ssl[Quarkus SSL guide].
+
+== Additional Camel Quarkus configuration
+
+This extension leverages https://github.com/hazelcast/quarkus-hazelcast-client[Hazelcast Client for Quarkus]. The configuration of the HazelcastInstance is managed by the extension. To configure Hazelcast Instance, check the https://github.com/hazelcast/quarkus-hazelcast-client[Hazelcast Client for Quarkus] guide.
+
+*Please note that the camel-quarkus-hazelcast component works only with the client mode.*
+
+To use the Hazelcast instance in the camel-quarkus-hazelcast component, you should configure the component with :
+
+* The HazelcastInstance initialized by the Hazelcast Client for Quarkus
+* The component mode as : "client"
+
+Example of configuration for HazelcastMap component:
+
+[source,java]
+----
+ @Inject
+ HazelcastInstance hazelcastInstance;
+
+ @Produces
+ @ApplicationScoped
+ @Unremovable
+ @Named("hazelcast-map")
+ HazelcastDefaultComponent hazelcastMap() {
+ final HazelcastMapComponent hazelcastComponent = new HazelcastMapComponent();
+ hazelcastComponent.setHazelcastInstance(hazelcastInstance);
+ hazelcastComponent.setHazelcastMode(HazelcastConstants.HAZELCAST_CLIENT_MODE);
+ return getHazelcastComponent(hazelcastComponent);
+ }
+----
+
+You may want to check the https://github.com/apache/camel-quarkus/tree/master/integration-tests/hazelcast[integration test]
+in our source tree as an example.
+
diff --git a/docs/modules/ROOT/partials/reference/components/hazelcast-atomicvalue.adoc b/docs/modules/ROOT/partials/reference/components/hazelcast-atomicvalue.adoc
index 35a5536..ab1199e 100644
--- a/docs/modules/ROOT/partials/reference/components/hazelcast-atomicvalue.adoc
+++ b/docs/modules/ROOT/partials/reference/components/hazelcast-atomicvalue.adoc
@@ -2,11 +2,11 @@
// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
:cq-artifact-id: camel-quarkus-hazelcast
:cq-artifact-id-base: hazelcast
-:cq-native-supported: false
-:cq-status: Preview
+:cq-native-supported: true
+:cq-status: Stable
:cq-deprecated: false
:cq-jvm-since: 1.1.0
-:cq-native-since: n/a
+:cq-native-since: 1.6.0
:cq-camel-part-name: hazelcast-atomicvalue
:cq-camel-part-title: Hazelcast Atomic Number
:cq-camel-part-description: Increment, decrement, set, etc. Hazelcast atomic number (a grid wide number).
diff --git a/docs/modules/ROOT/partials/reference/components/hazelcast-instance.adoc b/docs/modules/ROOT/partials/reference/components/hazelcast-instance.adoc
index e798e8f..7dda28c 100644
--- a/docs/modules/ROOT/partials/reference/components/hazelcast-instance.adoc
+++ b/docs/modules/ROOT/partials/reference/components/hazelcast-instance.adoc
@@ -2,11 +2,11 @@
// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
:cq-artifact-id: camel-quarkus-hazelcast
:cq-artifact-id-base: hazelcast
-:cq-native-supported: false
-:cq-status: Preview
+:cq-native-supported: true
+:cq-status: Stable
:cq-deprecated: false
:cq-jvm-since: 1.1.0
-:cq-native-since: n/a
+:cq-native-since: 1.6.0
:cq-camel-part-name: hazelcast-instance
:cq-camel-part-title: Hazelcast Instance
:cq-camel-part-description: Consume join/leave events of a cache instance in a Hazelcast cluster.
diff --git a/docs/modules/ROOT/partials/reference/components/hazelcast-list.adoc b/docs/modules/ROOT/partials/reference/components/hazelcast-list.adoc
index 75a4ba6..51b7f1d 100644
--- a/docs/modules/ROOT/partials/reference/components/hazelcast-list.adoc
+++ b/docs/modules/ROOT/partials/reference/components/hazelcast-list.adoc
@@ -2,11 +2,11 @@
// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
:cq-artifact-id: camel-quarkus-hazelcast
:cq-artifact-id-base: hazelcast
-:cq-native-supported: false
-:cq-status: Preview
+:cq-native-supported: true
+:cq-status: Stable
:cq-deprecated: false
:cq-jvm-since: 1.1.0
-:cq-native-since: n/a
+:cq-native-since: 1.6.0
:cq-camel-part-name: hazelcast-list
:cq-camel-part-title: Hazelcast List
:cq-camel-part-description: Perform operations on Hazelcast distributed list.
diff --git a/docs/modules/ROOT/partials/reference/components/hazelcast-map.adoc b/docs/modules/ROOT/partials/reference/components/hazelcast-map.adoc
index f65e7ab..05b0586 100644
--- a/docs/modules/ROOT/partials/reference/components/hazelcast-map.adoc
+++ b/docs/modules/ROOT/partials/reference/components/hazelcast-map.adoc
@@ -2,11 +2,11 @@
// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
:cq-artifact-id: camel-quarkus-hazelcast
:cq-artifact-id-base: hazelcast
-:cq-native-supported: false
-:cq-status: Preview
+:cq-native-supported: true
+:cq-status: Stable
:cq-deprecated: false
:cq-jvm-since: 1.1.0
-:cq-native-since: n/a
+:cq-native-since: 1.6.0
:cq-camel-part-name: hazelcast-map
:cq-camel-part-title: Hazelcast Map
:cq-camel-part-description: Perform operations on Hazelcast distributed map.
diff --git a/docs/modules/ROOT/partials/reference/components/hazelcast-multimap.adoc b/docs/modules/ROOT/partials/reference/components/hazelcast-multimap.adoc
index bd58e45..45852d7 100644
--- a/docs/modules/ROOT/partials/reference/components/hazelcast-multimap.adoc
+++ b/docs/modules/ROOT/partials/reference/components/hazelcast-multimap.adoc
@@ -2,11 +2,11 @@
// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
:cq-artifact-id: camel-quarkus-hazelcast
:cq-artifact-id-base: hazelcast
-:cq-native-supported: false
-:cq-status: Preview
+:cq-native-supported: true
+:cq-status: Stable
:cq-deprecated: false
:cq-jvm-since: 1.1.0
-:cq-native-since: n/a
+:cq-native-since: 1.6.0
:cq-camel-part-name: hazelcast-multimap
:cq-camel-part-title: Hazelcast Multimap
:cq-camel-part-description: Perform operations on Hazelcast distributed multimap.
diff --git a/docs/modules/ROOT/partials/reference/components/hazelcast-queue.adoc b/docs/modules/ROOT/partials/reference/components/hazelcast-queue.adoc
index 567be16..2bf426b 100644
--- a/docs/modules/ROOT/partials/reference/components/hazelcast-queue.adoc
+++ b/docs/modules/ROOT/partials/reference/components/hazelcast-queue.adoc
@@ -2,11 +2,11 @@
// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
:cq-artifact-id: camel-quarkus-hazelcast
:cq-artifact-id-base: hazelcast
-:cq-native-supported: false
-:cq-status: Preview
+:cq-native-supported: true
+:cq-status: Stable
:cq-deprecated: false
:cq-jvm-since: 1.1.0
-:cq-native-since: n/a
+:cq-native-since: 1.6.0
:cq-camel-part-name: hazelcast-queue
:cq-camel-part-title: Hazelcast Queue
:cq-camel-part-description: Perform operations on Hazelcast distributed queue.
diff --git a/docs/modules/ROOT/partials/reference/components/hazelcast-replicatedmap.adoc b/docs/modules/ROOT/partials/reference/components/hazelcast-replicatedmap.adoc
index ff2da1b..1f287b1 100644
--- a/docs/modules/ROOT/partials/reference/components/hazelcast-replicatedmap.adoc
+++ b/docs/modules/ROOT/partials/reference/components/hazelcast-replicatedmap.adoc
@@ -2,11 +2,11 @@
// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
:cq-artifact-id: camel-quarkus-hazelcast
:cq-artifact-id-base: hazelcast
-:cq-native-supported: false
-:cq-status: Preview
+:cq-native-supported: true
+:cq-status: Stable
:cq-deprecated: false
:cq-jvm-since: 1.1.0
-:cq-native-since: n/a
+:cq-native-since: 1.6.0
:cq-camel-part-name: hazelcast-replicatedmap
:cq-camel-part-title: Hazelcast Replicated Map
:cq-camel-part-description: Perform operations on Hazelcast replicated map.
diff --git a/docs/modules/ROOT/partials/reference/components/hazelcast-ringbuffer.adoc b/docs/modules/ROOT/partials/reference/components/hazelcast-ringbuffer.adoc
index 31bd340..3fec359 100644
--- a/docs/modules/ROOT/partials/reference/components/hazelcast-ringbuffer.adoc
+++ b/docs/modules/ROOT/partials/reference/components/hazelcast-ringbuffer.adoc
@@ -2,11 +2,11 @@
// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
:cq-artifact-id: camel-quarkus-hazelcast
:cq-artifact-id-base: hazelcast
-:cq-native-supported: false
-:cq-status: Preview
+:cq-native-supported: true
+:cq-status: Stable
:cq-deprecated: false
:cq-jvm-since: 1.1.0
-:cq-native-since: n/a
+:cq-native-since: 1.6.0
:cq-camel-part-name: hazelcast-ringbuffer
:cq-camel-part-title: Hazelcast Ringbuffer
:cq-camel-part-description: Perform operations on Hazelcast distributed ringbuffer.
diff --git a/docs/modules/ROOT/partials/reference/components/hazelcast-seda.adoc b/docs/modules/ROOT/partials/reference/components/hazelcast-seda.adoc
index be60d51..c16c57f 100644
--- a/docs/modules/ROOT/partials/reference/components/hazelcast-seda.adoc
+++ b/docs/modules/ROOT/partials/reference/components/hazelcast-seda.adoc
@@ -2,11 +2,11 @@
// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
:cq-artifact-id: camel-quarkus-hazelcast
:cq-artifact-id-base: hazelcast
-:cq-native-supported: false
-:cq-status: Preview
+:cq-native-supported: true
+:cq-status: Stable
:cq-deprecated: false
:cq-jvm-since: 1.1.0
-:cq-native-since: n/a
+:cq-native-since: 1.6.0
:cq-camel-part-name: hazelcast-seda
:cq-camel-part-title: Hazelcast SEDA
:cq-camel-part-description: Asynchronously send/receive Exchanges between Camel routes running on potentially distinct JVMs/hosts backed by Hazelcast BlockingQueue.
diff --git a/docs/modules/ROOT/partials/reference/components/hazelcast-set.adoc b/docs/modules/ROOT/partials/reference/components/hazelcast-set.adoc
index 60333e5..8fe418d 100644
--- a/docs/modules/ROOT/partials/reference/components/hazelcast-set.adoc
+++ b/docs/modules/ROOT/partials/reference/components/hazelcast-set.adoc
@@ -2,11 +2,11 @@
// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
:cq-artifact-id: camel-quarkus-hazelcast
:cq-artifact-id-base: hazelcast
-:cq-native-supported: false
-:cq-status: Preview
+:cq-native-supported: true
+:cq-status: Stable
:cq-deprecated: false
:cq-jvm-since: 1.1.0
-:cq-native-since: n/a
+:cq-native-since: 1.6.0
:cq-camel-part-name: hazelcast-set
:cq-camel-part-title: Hazelcast Set
:cq-camel-part-description: Perform operations on Hazelcast distributed set.
diff --git a/docs/modules/ROOT/partials/reference/components/hazelcast-topic.adoc b/docs/modules/ROOT/partials/reference/components/hazelcast-topic.adoc
index bf35bdc..9713267 100644
--- a/docs/modules/ROOT/partials/reference/components/hazelcast-topic.adoc
+++ b/docs/modules/ROOT/partials/reference/components/hazelcast-topic.adoc
@@ -2,11 +2,11 @@
// This file was generated by camel-quarkus-maven-plugin:update-extension-doc-page
:cq-artifact-id: camel-quarkus-hazelcast
:cq-artifact-id-base: hazelcast
-:cq-native-supported: false
-:cq-status: Preview
+:cq-native-supported: true
+:cq-status: Stable
:cq-deprecated: false
:cq-jvm-since: 1.1.0
-:cq-native-since: n/a
+:cq-native-since: 1.6.0
:cq-camel-part-name: hazelcast-topic
:cq-camel-part-title: Hazelcast Topic
:cq-camel-part-description: Send and receive messages to/from Hazelcast distributed topic.
diff --git a/extensions-jvm/hazelcast/deployment/src/main/java/org/apache/camel/quarkus/component/hazelcast/deployment/HazelcastProcessor.java b/extensions-jvm/hazelcast/deployment/src/main/java/org/apache/camel/quarkus/component/hazelcast/deployment/HazelcastProcessor.java
deleted file mode 100644
index 9b34f28..0000000
--- a/extensions-jvm/hazelcast/deployment/src/main/java/org/apache/camel/quarkus/component/hazelcast/deployment/HazelcastProcessor.java
+++ /dev/null
@@ -1,46 +0,0 @@
-/*
- * 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.hazelcast.deployment;
-
-import io.quarkus.deployment.annotations.BuildStep;
-import io.quarkus.deployment.annotations.ExecutionTime;
-import io.quarkus.deployment.annotations.Record;
-import io.quarkus.deployment.builditem.FeatureBuildItem;
-import io.quarkus.deployment.pkg.steps.NativeBuild;
-import org.apache.camel.quarkus.core.JvmOnlyRecorder;
-import org.jboss.logging.Logger;
-
-class HazelcastProcessor {
-
- private static final Logger LOG = Logger.getLogger(HazelcastProcessor.class);
- private static final String FEATURE = "camel-hazelcast";
-
- @BuildStep
- FeatureBuildItem feature() {
- return new FeatureBuildItem(FEATURE);
- }
-
- /**
- * Remove this once this extension starts supporting the native mode.
- */
- @BuildStep(onlyIf = NativeBuild.class)
- @Record(value = ExecutionTime.RUNTIME_INIT)
- void warnJvmInNative(JvmOnlyRecorder recorder) {
- JvmOnlyRecorder.warnJvmInNative(LOG, FEATURE); // warn at build time
- recorder.warnJvmInNative(FEATURE); // warn at runtime
- }
-}
diff --git a/extensions-jvm/hazelcast/integration-test/pom.xml b/extensions-jvm/hazelcast/integration-test/pom.xml
deleted file mode 100644
index 9086891..0000000
--- a/extensions-jvm/hazelcast/integration-test/pom.xml
+++ /dev/null
@@ -1,78 +0,0 @@
-<?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>1.6.0-SNAPSHOT</version>
- <relativePath>../../../poms/build-parent-it/pom.xml</relativePath>
- </parent>
-
- <artifactId>camel-quarkus-hazelcast-integration-test</artifactId>
- <name>Camel Quarkus :: Hazelcast Atomic Number :: Integration Test</name>
- <description>Integration tests for Camel Quarkus Hazelcast Atomic Number extension</description>
-
- <properties>
- <!-- mvnd, a.k.a. Maven Daemon: https://github.com/mvndaemon/mvnd -->
- <!-- The following rule tells mvnd to build the listed deployment modules before this module. -->
- <!-- This is important because mvnd builds modules in parallel by default. The deployment modules are not -->
- <!-- explicit dependencies of this module in the Maven sense, although they are required by the Quarkus Maven plugin. -->
- <!-- Please update the rule whenever you change the dependencies of this module by running -->
- <!-- mvn process-resources -Pformat from the root directory -->
- <mvnd.builder.rule>camel-quarkus-hazelcast-deployment,camel-quarkus-support-policy-deployment</mvnd.builder.rule>
- </properties>
-
- <dependencyManagement>
- <dependencies>
- <dependency>
- <groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-bom-test</artifactId>
- <version>${project.version}</version>
- <type>pom</type>
- <scope>import</scope>
- </dependency>
- </dependencies>
- </dependencyManagement>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.camel.quarkus</groupId>
- <artifactId>camel-quarkus-hazelcast</artifactId>
- </dependency>
- <dependency>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-resteasy</artifactId>
- </dependency>
-
- <!-- test dependencies -->
- <dependency>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-junit5</artifactId>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>io.rest-assured</groupId>
- <artifactId>rest-assured</artifactId>
- <scope>test</scope>
- </dependency>
- </dependencies>
-
-</project>
diff --git a/extensions-jvm/hazelcast/integration-test/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastResource.java b/extensions-jvm/hazelcast/integration-test/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastResource.java
deleted file mode 100644
index 1cb67fc..0000000
--- a/extensions-jvm/hazelcast/integration-test/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastResource.java
+++ /dev/null
@@ -1,181 +0,0 @@
-/*
- * 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.hazelcast.it;
-
-import javax.enterprise.context.ApplicationScoped;
-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 javax.ws.rs.core.Response;
-
-import org.apache.camel.CamelContext;
-import org.jboss.logging.Logger;
-
-@Path("/hazelcast")
-@ApplicationScoped
-public class HazelcastResource {
-
- private static final Logger LOG = Logger.getLogger(HazelcastResource.class);
-
- private static final String COMPONENT_HAZELCAST_ATOMICVALUE = "hazelcast-atomicvalue";
- private static final String COMPONENT_HAZELCAST_INSTANCE = "hazelcast-instance";
- private static final String COMPONENT_HAZELCAST_LIST = "hazelcast-list";
- private static final String COMPONENT_HAZELCAST_MAP = "hazelcast-map";
- private static final String COMPONENT_HAZELCAST_MULTIMAP = "hazelcast-multimap";
- private static final String COMPONENT_HAZELCAST_QUEUE = "hazelcast-queue";
- private static final String COMPONENT_HAZELCAST_REPLICATEDMAP = "hazelcast-replicatedmap";
- private static final String COMPONENT_HAZELCAST_RINGBUFFER = "hazelcast-ringbuffer";
- private static final String COMPONENT_HAZELCAST_SEDA = "hazelcast-seda";
- private static final String COMPONENT_HAZELCAST_SET = "hazelcast-set";
- private static final String COMPONENT_HAZELCAST_TOPIC = "hazelcast-topic";
- @Inject
- CamelContext context;
-
- @Path("/load/component/hazelcast-atomicvalue")
- @GET
- @Produces(MediaType.TEXT_PLAIN)
- public Response loadComponentHazelcastAtomicvalue() throws Exception {
- /* This is an autogenerated test */
- if (context.getComponent(COMPONENT_HAZELCAST_ATOMICVALUE) != null) {
- return Response.ok().build();
- }
- LOG.warnf("Could not load [%s] from the Camel context", COMPONENT_HAZELCAST_ATOMICVALUE);
- return Response.status(500, COMPONENT_HAZELCAST_ATOMICVALUE + " could not be loaded from the Camel context").build();
- }
-
- @Path("/load/component/hazelcast-instance")
- @GET
- @Produces(MediaType.TEXT_PLAIN)
- public Response loadComponentHazelcastInstance() throws Exception {
- /* This is an autogenerated test */
- if (context.getComponent(COMPONENT_HAZELCAST_INSTANCE) != null) {
- return Response.ok().build();
- }
- LOG.warnf("Could not load [%s] from the Camel context", COMPONENT_HAZELCAST_INSTANCE);
- return Response.status(500, COMPONENT_HAZELCAST_INSTANCE + " could not be loaded from the Camel context").build();
- }
-
- @Path("/load/component/hazelcast-list")
- @GET
- @Produces(MediaType.TEXT_PLAIN)
- public Response loadComponentHazelcastList() throws Exception {
- /* This is an autogenerated test */
- if (context.getComponent(COMPONENT_HAZELCAST_LIST) != null) {
- return Response.ok().build();
- }
- LOG.warnf("Could not load [%s] from the Camel context", COMPONENT_HAZELCAST_LIST);
- return Response.status(500, COMPONENT_HAZELCAST_LIST + " could not be loaded from the Camel context").build();
- }
-
- @Path("/load/component/hazelcast-map")
- @GET
- @Produces(MediaType.TEXT_PLAIN)
- public Response loadComponentHazelcastMap() throws Exception {
- /* This is an autogenerated test */
- if (context.getComponent(COMPONENT_HAZELCAST_MAP) != null) {
- return Response.ok().build();
- }
- LOG.warnf("Could not load [%s] from the Camel context", COMPONENT_HAZELCAST_MAP);
- return Response.status(500, COMPONENT_HAZELCAST_MAP + " could not be loaded from the Camel context").build();
- }
-
- @Path("/load/component/hazelcast-multimap")
- @GET
- @Produces(MediaType.TEXT_PLAIN)
- public Response loadComponentHazelcastMultimap() throws Exception {
- /* This is an autogenerated test */
- if (context.getComponent(COMPONENT_HAZELCAST_MULTIMAP) != null) {
- return Response.ok().build();
- }
- LOG.warnf("Could not load [%s] from the Camel context", COMPONENT_HAZELCAST_MULTIMAP);
- return Response.status(500, COMPONENT_HAZELCAST_MULTIMAP + " could not be loaded from the Camel context").build();
- }
-
- @Path("/load/component/hazelcast-queue")
- @GET
- @Produces(MediaType.TEXT_PLAIN)
- public Response loadComponentHazelcastQueue() throws Exception {
- /* This is an autogenerated test */
- if (context.getComponent(COMPONENT_HAZELCAST_QUEUE) != null) {
- return Response.ok().build();
- }
- LOG.warnf("Could not load [%s] from the Camel context", COMPONENT_HAZELCAST_QUEUE);
- return Response.status(500, COMPONENT_HAZELCAST_QUEUE + " could not be loaded from the Camel context").build();
- }
-
- @Path("/load/component/hazelcast-replicatedmap")
- @GET
- @Produces(MediaType.TEXT_PLAIN)
- public Response loadComponentHazelcastReplicatedmap() throws Exception {
- /* This is an autogenerated test */
- if (context.getComponent(COMPONENT_HAZELCAST_REPLICATEDMAP) != null) {
- return Response.ok().build();
- }
- LOG.warnf("Could not load [%s] from the Camel context", COMPONENT_HAZELCAST_REPLICATEDMAP);
- return Response.status(500, COMPONENT_HAZELCAST_REPLICATEDMAP + " could not be loaded from the Camel context").build();
- }
-
- @Path("/load/component/hazelcast-ringbuffer")
- @GET
- @Produces(MediaType.TEXT_PLAIN)
- public Response loadComponentHazelcastRingbuffer() throws Exception {
- /* This is an autogenerated test */
- if (context.getComponent(COMPONENT_HAZELCAST_RINGBUFFER) != null) {
- return Response.ok().build();
- }
- LOG.warnf("Could not load [%s] from the Camel context", COMPONENT_HAZELCAST_RINGBUFFER);
- return Response.status(500, COMPONENT_HAZELCAST_RINGBUFFER + " could not be loaded from the Camel context").build();
- }
-
- @Path("/load/component/hazelcast-seda")
- @GET
- @Produces(MediaType.TEXT_PLAIN)
- public Response loadComponentHazelcastSeda() throws Exception {
- /* This is an autogenerated test */
- if (context.getComponent(COMPONENT_HAZELCAST_SEDA) != null) {
- return Response.ok().build();
- }
- LOG.warnf("Could not load [%s] from the Camel context", COMPONENT_HAZELCAST_SEDA);
- return Response.status(500, COMPONENT_HAZELCAST_SEDA + " could not be loaded from the Camel context").build();
- }
-
- @Path("/load/component/hazelcast-set")
- @GET
- @Produces(MediaType.TEXT_PLAIN)
- public Response loadComponentHazelcastSet() throws Exception {
- /* This is an autogenerated test */
- if (context.getComponent(COMPONENT_HAZELCAST_SET) != null) {
- return Response.ok().build();
- }
- LOG.warnf("Could not load [%s] from the Camel context", COMPONENT_HAZELCAST_SET);
- return Response.status(500, COMPONENT_HAZELCAST_SET + " could not be loaded from the Camel context").build();
- }
-
- @Path("/load/component/hazelcast-topic")
- @GET
- @Produces(MediaType.TEXT_PLAIN)
- public Response loadComponentHazelcastTopic() throws Exception {
- /* This is an autogenerated test */
- if (context.getComponent(COMPONENT_HAZELCAST_TOPIC) != null) {
- return Response.ok().build();
- }
- LOG.warnf("Could not load [%s] from the Camel context", COMPONENT_HAZELCAST_TOPIC);
- return Response.status(500, COMPONENT_HAZELCAST_TOPIC + " could not be loaded from the Camel context").build();
- }
-}
diff --git a/extensions-jvm/hazelcast/integration-test/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastTest.java b/extensions-jvm/hazelcast/integration-test/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastTest.java
deleted file mode 100644
index 6322a8e..0000000
--- a/extensions-jvm/hazelcast/integration-test/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastTest.java
+++ /dev/null
@@ -1,114 +0,0 @@
-/*
- * 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.hazelcast.it;
-
-import io.quarkus.test.junit.QuarkusTest;
-import io.restassured.RestAssured;
-import org.junit.jupiter.api.Test;
-
-@QuarkusTest
-class HazelcastTest {
-
- @Test
- public void loadComponentHazelcastAtomicvalue() {
- /* A simple autogenerated test */
- RestAssured.get("/hazelcast/load/component/hazelcast-atomicvalue")
- .then()
- .statusCode(200);
- }
-
- @Test
- public void loadComponentHazelcastInstance() {
- /* A simple autogenerated test */
- RestAssured.get("/hazelcast/load/component/hazelcast-instance")
- .then()
- .statusCode(200);
- }
-
- @Test
- public void loadComponentHazelcastList() {
- /* A simple autogenerated test */
- RestAssured.get("/hazelcast/load/component/hazelcast-list")
- .then()
- .statusCode(200);
- }
-
- @Test
- public void loadComponentHazelcastMap() {
- /* A simple autogenerated test */
- RestAssured.get("/hazelcast/load/component/hazelcast-map")
- .then()
- .statusCode(200);
- }
-
- @Test
- public void loadComponentHazelcastMultimap() {
- /* A simple autogenerated test */
- RestAssured.get("/hazelcast/load/component/hazelcast-multimap")
- .then()
- .statusCode(200);
- }
-
- @Test
- public void loadComponentHazelcastQueue() {
- /* A simple autogenerated test */
- RestAssured.get("/hazelcast/load/component/hazelcast-queue")
- .then()
- .statusCode(200);
- }
-
- @Test
- public void loadComponentHazelcastReplicatedmap() {
- /* A simple autogenerated test */
- RestAssured.get("/hazelcast/load/component/hazelcast-replicatedmap")
- .then()
- .statusCode(200);
- }
-
- @Test
- public void loadComponentHazelcastRingbuffer() {
- /* A simple autogenerated test */
- RestAssured.get("/hazelcast/load/component/hazelcast-ringbuffer")
- .then()
- .statusCode(200);
- }
-
- @Test
- public void loadComponentHazelcastSeda() {
- /* A simple autogenerated test */
- RestAssured.get("/hazelcast/load/component/hazelcast-seda")
- .then()
- .statusCode(200);
- }
-
- @Test
- public void loadComponentHazelcastSet() {
- /* A simple autogenerated test */
- RestAssured.get("/hazelcast/load/component/hazelcast-set")
- .then()
- .statusCode(200);
- }
-
- @Test
- public void loadComponentHazelcastTopic() {
- /* A simple autogenerated test */
- RestAssured.get("/hazelcast/load/component/hazelcast-topic")
- .then()
- .statusCode(200);
- }
-
-}
diff --git a/extensions-jvm/pom.xml b/extensions-jvm/pom.xml
index 165cb00..fd546e4 100644
--- a/extensions-jvm/pom.xml
+++ b/extensions-jvm/pom.xml
@@ -74,7 +74,6 @@
<module>ganglia</module>
<module>groovy</module>
<module>guava-eventbus</module>
- <module>hazelcast</module>
<module>hbase</module>
<module>hdfs</module>
<module>hl7</module>
diff --git a/extensions-jvm/hazelcast/deployment/pom.xml b/extensions/hazelcast/deployment/pom.xml
similarity index 93%
rename from extensions-jvm/hazelcast/deployment/pom.xml
rename to extensions/hazelcast/deployment/pom.xml
index 020059b..ca6f897 100644
--- a/extensions-jvm/hazelcast/deployment/pom.xml
+++ b/extensions/hazelcast/deployment/pom.xml
@@ -38,6 +38,10 @@
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-hazelcast</artifactId>
</dependency>
+ <dependency>
+ <groupId>com.hazelcast</groupId>
+ <artifactId>quarkus-hazelcast-client-deployment</artifactId>
+ </dependency>
</dependencies>
<build>
diff --git a/extensions/hazelcast/deployment/src/main/java/org/apache/camel/quarkus/component/hazelcast/deployment/HazelcastProcessor.java b/extensions/hazelcast/deployment/src/main/java/org/apache/camel/quarkus/component/hazelcast/deployment/HazelcastProcessor.java
new file mode 100644
index 0000000..9b02753
--- /dev/null
+++ b/extensions/hazelcast/deployment/src/main/java/org/apache/camel/quarkus/component/hazelcast/deployment/HazelcastProcessor.java
@@ -0,0 +1,113 @@
+/*
+ * 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.hazelcast.deployment;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import javax.management.MBeanServer;
+import javax.naming.Context;
+import javax.net.ssl.KeyManager;
+import javax.net.ssl.SNIServerName;
+import javax.net.ssl.TrustManager;
+import javax.xml.xpath.XPathFactory;
+
+import com.hazelcast.collection.IList;
+import com.hazelcast.collection.IQueue;
+import com.hazelcast.collection.ISet;
+import com.hazelcast.core.HazelcastInstance;
+import com.hazelcast.cp.IAtomicLong;
+import com.hazelcast.map.IMap;
+import com.hazelcast.multimap.MultiMap;
+import com.hazelcast.replicatedmap.ReplicatedMap;
+import com.hazelcast.ringbuffer.Ringbuffer;
+import com.hazelcast.topic.ITopic;
+import io.quarkus.deployment.annotations.BuildProducer;
+import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.builditem.ExtensionSslNativeSupportBuildItem;
+import io.quarkus.deployment.builditem.FeatureBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.ReflectiveHierarchyBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.ReflectiveHierarchyIgnoreWarningBuildItem;
+import org.apache.camel.tooling.model.MainModel;
+import org.jboss.jandex.DotName;
+import org.jboss.jandex.Type;
+
+class HazelcastProcessor {
+
+ private static final String FEATURE = "camel-hazelcast";
+
+ @BuildStep
+ FeatureBuildItem feature() {
+ return new FeatureBuildItem(FEATURE);
+ }
+
+ @BuildStep
+ ExtensionSslNativeSupportBuildItem activateSslNativeSupport() {
+ return new ExtensionSslNativeSupportBuildItem(FEATURE);
+ }
+
+ @BuildStep
+ List<ReflectiveClassBuildItem> registerReflectiveClasses() {
+ List<ReflectiveClassBuildItem> items = new ArrayList<ReflectiveClassBuildItem>();
+ items.add(new ReflectiveClassBuildItem(false, true, "com.hazelcast.core.HazelcastInstance"));
+ items.add(new ReflectiveClassBuildItem(false, true, "com.hazelcast.config.Config"));
+ items.add(new ReflectiveClassBuildItem(false, true, "com.hazelcast.config.ClientConfig"));
+ return items;
+ }
+
+ @BuildStep
+ void registerCustomImplementationClasses(BuildProducer<ReflectiveHierarchyBuildItem> reflectiveClassHierarchies,
+ BuildProducer<ReflectiveHierarchyIgnoreWarningBuildItem> ignoreWarnings) {
+
+ registerTypeHierarchy(reflectiveClassHierarchies, ignoreWarnings,
+ IList.class,
+ IQueue.class,
+ ISet.class,
+ HazelcastInstance.class,
+ IAtomicLong.class,
+ IMap.class,
+ MultiMap.class,
+ ReplicatedMap.class,
+ Ringbuffer.class,
+ ITopic.class,
+ MBeanServer.class,
+ Context.class,
+ KeyManager.class,
+ SNIServerName.class,
+ TrustManager.class,
+ XPathFactory.class,
+ MainModel.class);
+ }
+
+ private static void registerTypeHierarchy(
+ BuildProducer<ReflectiveHierarchyBuildItem> reflectiveHierarchyClass,
+ BuildProducer<ReflectiveHierarchyIgnoreWarningBuildItem> ignoreWarnings,
+ Class<?>... classNames) {
+
+ for (Class<?> klass : classNames) {
+ DotName simpleName = DotName.createSimple(klass.getName());
+
+ reflectiveHierarchyClass.produce(
+ new ReflectiveHierarchyBuildItem.Builder().type(Type.create(simpleName, Type.Kind.CLASS)).build());
+
+ ignoreWarnings.produce(
+ new ReflectiveHierarchyIgnoreWarningBuildItem(simpleName));
+ }
+ }
+
+}
diff --git a/extensions-jvm/hazelcast/pom.xml b/extensions/hazelcast/pom.xml
similarity index 97%
rename from extensions-jvm/hazelcast/pom.xml
rename to extensions/hazelcast/pom.xml
index aedcfc3..abf8265 100644
--- a/extensions-jvm/hazelcast/pom.xml
+++ b/extensions/hazelcast/pom.xml
@@ -33,6 +33,5 @@
<modules>
<module>deployment</module>
<module>runtime</module>
- <module>integration-test</module>
</modules>
</project>
diff --git a/extensions-jvm/hazelcast/runtime/pom.xml b/extensions/hazelcast/runtime/pom.xml
similarity index 83%
rename from extensions-jvm/hazelcast/runtime/pom.xml
rename to extensions/hazelcast/runtime/pom.xml
index 5ff19da..1995df5 100644
--- a/extensions-jvm/hazelcast/runtime/pom.xml
+++ b/extensions/hazelcast/runtime/pom.xml
@@ -32,6 +32,7 @@
<properties>
<camel.quarkus.jvmSince>1.1.0</camel.quarkus.jvmSince>
+ <camel.quarkus.nativeSince>1.6.0</camel.quarkus.nativeSince>
</properties>
<dependencyManagement>
@@ -43,6 +44,13 @@
<type>pom</type>
<scope>import</scope>
</dependency>
+ <dependency>
+ <groupId>com.hazelcast</groupId>
+ <artifactId>quarkus-hazelcast-client-bom</artifactId>
+ <version>${quarkus-hazelcast-client.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
</dependencies>
</dependencyManagement>
@@ -55,6 +63,19 @@
<groupId>org.apache.camel</groupId>
<artifactId>camel-hazelcast</artifactId>
</dependency>
+ <dependency>
+ <groupId>com.hazelcast</groupId>
+ <artifactId>quarkus-hazelcast-client</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.hazelcast</groupId>
+ <artifactId>hazelcast</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.graalvm.nativeimage</groupId>
+ <artifactId>svm</artifactId>
+ <scope>provided</scope>
+ </dependency>
</dependencies>
<build>
diff --git a/extensions/hazelcast/runtime/src/main/doc/configuration.adoc b/extensions/hazelcast/runtime/src/main/doc/configuration.adoc
new file mode 100644
index 0000000..859d358
--- /dev/null
+++ b/extensions/hazelcast/runtime/src/main/doc/configuration.adoc
@@ -0,0 +1,30 @@
+This extension leverages https://github.com/hazelcast/quarkus-hazelcast-client[Hazelcast Client for Quarkus]. The configuration of the HazelcastInstance is managed by the extension. To configure Hazelcast Instance, check the https://github.com/hazelcast/quarkus-hazelcast-client[Hazelcast Client for Quarkus] guide.
+
+*Please note that the camel-quarkus-hazelcast component works only with the client mode.*
+
+To use the Hazelcast instance in the camel-quarkus-hazelcast component, you should configure the component with :
+
+* The HazelcastInstance initialized by the Hazelcast Client for Quarkus
+* The component mode as : "client"
+
+Example of configuration for HazelcastMap component:
+
+[source,java]
+----
+ @Inject
+ HazelcastInstance hazelcastInstance;
+
+ @Produces
+ @ApplicationScoped
+ @Unremovable
+ @Named("hazelcast-map")
+ HazelcastDefaultComponent hazelcastMap() {
+ final HazelcastMapComponent hazelcastComponent = new HazelcastMapComponent();
+ hazelcastComponent.setHazelcastInstance(hazelcastInstance);
+ hazelcastComponent.setHazelcastMode(HazelcastConstants.HAZELCAST_CLIENT_MODE);
+ return getHazelcastComponent(hazelcastComponent);
+ }
+----
+
+You may want to check the https://github.com/apache/camel-quarkus/tree/master/integration-tests/hazelcast[integration test]
+in our source tree as an example.
\ No newline at end of file
diff --git a/extensions/hazelcast/runtime/src/main/java/org/apache/camel/quarkus/component/hazelcast/runtime/HazelcastSubstitutions.java b/extensions/hazelcast/runtime/src/main/java/org/apache/camel/quarkus/component/hazelcast/runtime/HazelcastSubstitutions.java
new file mode 100644
index 0000000..920a3be
--- /dev/null
+++ b/extensions/hazelcast/runtime/src/main/java/org/apache/camel/quarkus/component/hazelcast/runtime/HazelcastSubstitutions.java
@@ -0,0 +1,44 @@
+/*
+ * 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.hazelcast.runtime;
+
+import com.hazelcast.config.Config;
+import com.hazelcast.core.Hazelcast;
+import com.hazelcast.core.HazelcastInstance;
+import com.oracle.svm.core.annotate.Substitute;
+import com.oracle.svm.core.annotate.TargetClass;
+
+public class HazelcastSubstitutions {
+}
+
+/**
+ * Force usage of Hazelcast client
+ */
+@TargetClass(Hazelcast.class)
+final class Target_Hazelcast {
+ @Substitute
+ public static HazelcastInstance newHazelcastInstance(Config config) {
+ throw new UnsupportedOperationException(
+ "Hazelcast node mode is not supported. Please use client mode.");
+ }
+
+ @Substitute
+ public static HazelcastInstance getOrCreateHazelcastInstance(Config config) {
+ throw new UnsupportedOperationException(
+ "Hazelcast node mode is not supported. Please use client mode.");
+ }
+}
diff --git a/extensions-jvm/hazelcast/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/hazelcast/runtime/src/main/resources/META-INF/quarkus-extension.yaml
similarity index 97%
rename from extensions-jvm/hazelcast/runtime/src/main/resources/META-INF/quarkus-extension.yaml
rename to extensions/hazelcast/runtime/src/main/resources/META-INF/quarkus-extension.yaml
index 82104c7..2de9409 100644
--- a/extensions-jvm/hazelcast/runtime/src/main/resources/META-INF/quarkus-extension.yaml
+++ b/extensions/hazelcast/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -24,9 +24,8 @@
name: "Camel Hazelcast Atomic Number"
description: "Increment, decrement, set, etc. Hazelcast atomic number (a grid wide number)"
metadata:
- unlisted: true
guide: "https://camel.apache.org/camel-quarkus/latest/reference/extensions/hazelcast.html"
categories:
- "integration"
status:
- - "preview"
+ - "stable"
diff --git a/extensions/pom.xml b/extensions/pom.xml
index 7214a6f..3f6e8ff 100644
--- a/extensions/pom.xml
+++ b/extensions/pom.xml
@@ -119,6 +119,7 @@
<module>grok</module>
<module>grpc</module>
<module>gson</module>
+ <module>hazelcast</module>
<module>headersmap</module>
<module>http</module>
<module>hystrix</module>
diff --git a/integration-tests/hazelcast/pom.xml b/integration-tests/hazelcast/pom.xml
new file mode 100644
index 0000000..dae841b
--- /dev/null
+++ b/integration-tests/hazelcast/pom.xml
@@ -0,0 +1,154 @@
+<?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-integration-tests</artifactId>
+ <version>1.6.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>camel-quarkus-integration-test-hazelcast</artifactId>
+ <name>Camel Quarkus :: Integration Tests :: Hazelcast Atomic Number</name>
+ <description>Integration tests for Camel Quarkus Hazelcast Atomic Number extension</description>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-bom-test</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>import</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-hazelcast</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-mock</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-log</artifactId>
+ </dependency>
+
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-resteasy-jackson</artifactId>
+ </dependency>
+
+ <!-- test dependencies -->
+ <dependency>
+ <groupId>io.quarkus</groupId>
+ <artifactId>quarkus-junit5</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>io.rest-assured</groupId>
+ <artifactId>rest-assured</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.hazelcast</groupId>
+ <artifactId>quarkus-test-hazelcast</artifactId>
+ </dependency>
+
+ <!-- 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-hazelcast-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-log-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-mock-deployment</artifactId>
+ <version>${project.version}</version>
+ <type>pom</type>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>*</groupId>
+ <artifactId>*</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+
+ <profiles>
+ <profile>
+ <id>native</id>
+ <activation>
+ <property>
+ <name>native</name>
+ </property>
+ </activation>
+ <properties>
+ <quarkus.package.type>native</quarkus.package.type>
+ </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>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+</project>
diff --git a/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/AbstractHazelcastCollectionResource.java b/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/AbstractHazelcastCollectionResource.java
new file mode 100644
index 0000000..21e4492
--- /dev/null
+++ b/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/AbstractHazelcastCollectionResource.java
@@ -0,0 +1,124 @@
+/*
+ * 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.hazelcast.it;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import javax.inject.Inject;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.core.Response;
+
+import com.hazelcast.collection.ItemEvent;
+import io.quarkus.runtime.StartupEvent;
+import org.apache.camel.CamelContext;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.component.hazelcast.HazelcastConstants;
+import org.apache.camel.component.hazelcast.HazelcastOperation;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.jboss.logging.Logger;
+
+public abstract class AbstractHazelcastCollectionResource {
+
+ private static final Logger LOG = Logger.getLogger(AbstractHazelcastCollectionResource.class);
+
+ @Inject
+ ProducerTemplate producerTemplate;
+
+ @Inject
+ CamelContext context;
+
+ protected String endpointUri;
+ protected String mockAddedEndpoint;
+ protected String mockDeletedEndpoint;
+
+ /**
+ * init endpoints
+ *
+ * @param startupEvent
+ */
+ public abstract void init(StartupEvent startupEvent);
+
+ @PUT
+ public Response add(String value) {
+ producerTemplate.sendBodyAndHeader(endpointUri, value, HazelcastConstants.OPERATION, HazelcastOperation.ADD);
+ return Response.accepted().build();
+ }
+
+ @PUT
+ @Path("all")
+ public Response addAll(Collection values) {
+ producerTemplate.sendBodyAndHeader(endpointUri, values, HazelcastConstants.OPERATION, HazelcastOperation.ADD_ALL);
+ return Response.accepted().build();
+ }
+
+ @DELETE
+ @Path("value")
+ public Response delete(String value) {
+ Map<String, Object> headers = new HashMap<>();
+ headers.put(HazelcastConstants.OPERATION, HazelcastOperation.REMOVE_VALUE);
+ producerTemplate.sendBodyAndHeaders(endpointUri, value, headers);
+ return Response.accepted().build();
+ }
+
+ @DELETE
+ @Path("all")
+ public Response delete(Collection values) {
+ Map<String, Object> headers = new HashMap<>();
+ headers.put(HazelcastConstants.OPERATION, HazelcastOperation.REMOVE_ALL);
+ producerTemplate.sendBodyAndHeaders(endpointUri, values, headers);
+ return Response.accepted().build();
+ }
+
+ @POST
+ @Path("retain")
+ public Response retainAll(Collection values) {
+ producerTemplate.sendBodyAndHeader(endpointUri, values, HazelcastConstants.OPERATION, HazelcastOperation.RETAIN_ALL);
+ return Response.accepted().build();
+ }
+
+ @GET
+ @Path("added")
+ public List<String> getAddedValues() {
+ return getValues(mockAddedEndpoint);
+ }
+
+ @GET
+ @Path("deleted")
+ public List<String> getDeletedValues() {
+ return getValues(mockDeletedEndpoint);
+ }
+
+ private List<String> getValues(String endpointName) {
+ LOG.infof("getting response from mock endpoint %s", endpointName);
+ MockEndpoint mockEndpoint = context.getEndpoint(endpointName, MockEndpoint.class);
+ List<String> values = mockEndpoint.getReceivedExchanges().stream().map(
+ exchange -> {
+ ItemEvent itemEvent = exchange.getIn().getBody(ItemEvent.class);
+ return (String) itemEvent.getItem();
+ })
+ .collect(Collectors.toList());
+ return values;
+ }
+}
diff --git a/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/AbstractHazelcastMapResource.java b/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/AbstractHazelcastMapResource.java
new file mode 100644
index 0000000..e3b8ad0
--- /dev/null
+++ b/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/AbstractHazelcastMapResource.java
@@ -0,0 +1,141 @@
+/*
+ * 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.hazelcast.it;
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+
+import javax.inject.Inject;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.core.Response;
+
+import io.quarkus.runtime.StartupEvent;
+import org.apache.camel.CamelContext;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.component.hazelcast.HazelcastConstants;
+import org.apache.camel.component.hazelcast.HazelcastOperation;
+import org.apache.camel.component.mock.MockEndpoint;
+import org.apache.camel.quarkus.component.hazelcast.it.model.HazelcastMapRequest;
+import org.jboss.logging.Logger;
+
+public abstract class AbstractHazelcastMapResource {
+ private static final Logger LOG = Logger.getLogger(AbstractHazelcastMapResource.class);
+
+ protected String endpointUri;
+ protected String mockAddedEndpoint;
+ protected String mockDeletedEndpoint;
+ protected String mockEvictedEndpoint;
+ protected String mockUpdatedEndpoint;
+
+ @Inject
+ ProducerTemplate producerTemplate;
+
+ @Inject
+ CamelContext context;
+
+ /**
+ * init endpoints
+ *
+ * @param startupEvent
+ */
+ public abstract void init(StartupEvent startupEvent);
+
+ @POST
+ @Path("add")
+ public Response add(HazelcastMapRequest request) {
+ Map<String, Object> headers = new HashMap<>();
+ headers.put(HazelcastConstants.OPERATION, HazelcastOperation.PUT);
+ headers.put(HazelcastConstants.OBJECT_ID, request.getId());
+ if (request.getTtl() != null && request.getTtlUnit() != null) {
+ headers.put(HazelcastConstants.TTL_UNIT, request.getTtlUnit());
+ headers.put(HazelcastConstants.TTL_VALUE, request.getTtl());
+ }
+ producerTemplate.sendBodyAndHeaders(endpointUri, request.getValue(), headers);
+ return Response.accepted().build();
+ }
+
+ @GET
+ @Path("get/{id}")
+ public Object get(@PathParam("id") String id) {
+ Map<String, Object> headers = new HashMap<>();
+ headers.put(HazelcastConstants.OPERATION, HazelcastOperation.GET);
+ headers.put(HazelcastConstants.OBJECT_ID, id);
+ return producerTemplate.requestBodyAndHeaders(endpointUri, null, headers);
+ }
+
+ @DELETE
+ @Path("{id}")
+ public Response delete(@PathParam("id") String id) {
+ Map<String, Object> headers = new HashMap<>();
+ headers.put(HazelcastConstants.OPERATION, HazelcastOperation.DELETE);
+ headers.put(HazelcastConstants.OBJECT_ID, id);
+ producerTemplate.sendBodyAndHeaders(endpointUri, null, headers);
+ return Response.accepted().build();
+ }
+
+ @GET
+ @Path("clear")
+ public Response clear() {
+ Map<String, Object> headers = new HashMap<>();
+ headers.put(HazelcastConstants.OPERATION, HazelcastOperation.CLEAR);
+ producerTemplate.sendBodyAndHeaders(endpointUri, "", headers);
+ return Response.accepted().build();
+ }
+
+ @GET
+ @Path("key/{id}")
+ public Boolean containsKey(@PathParam("id") String id) {
+ Map<String, Object> headers = new HashMap<>();
+ headers.put(HazelcastConstants.OPERATION, HazelcastOperation.CONTAINS_KEY);
+ headers.put(HazelcastConstants.OBJECT_ID, id);
+ return producerTemplate.requestBodyAndHeaders(endpointUri, null, headers, Boolean.class);
+ }
+
+ @GET
+ @Path("value/{value}")
+ public Boolean containsValue(@PathParam("value") String value) {
+ return producerTemplate.requestBodyAndHeader(endpointUri, value, HazelcastConstants.OPERATION,
+ HazelcastOperation.CONTAINS_VALUE, Boolean.class);
+ }
+
+ @GET
+ @Path("added")
+ public List getAddedValues() {
+ return getValues(mockAddedEndpoint);
+ }
+
+ @GET
+ @Path("deleted")
+ public List getDeletedValues() {
+ return getValues(mockDeletedEndpoint);
+ }
+
+ protected List getValues(String endpointName) {
+ LOG.infof("getting response from mock endpoint %s", endpointName);
+ MockEndpoint mockEndpoint = context.getEndpoint(endpointName, MockEndpoint.class);
+ List<String> values = mockEndpoint.getReceivedExchanges().stream().map(
+ exchange -> exchange.getIn().getHeader(HazelcastConstants.OBJECT_ID, String.class))
+ .collect(Collectors.toList());
+ return values;
+ }
+}
diff --git a/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastAtomicResource.java b/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastAtomicResource.java
new file mode 100644
index 0000000..6c57f3c
--- /dev/null
+++ b/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastAtomicResource.java
@@ -0,0 +1,87 @@
+/*
+ * 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.hazelcast.it;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.core.Response;
+
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.component.hazelcast.HazelcastConstants;
+import org.apache.camel.component.hazelcast.HazelcastOperation;
+import org.jboss.logging.Logger;
+
+@Path("/hazelcast/atomic")
+@ApplicationScoped
+public class HazelcastAtomicResource {
+ private static final Logger LOG = Logger.getLogger(HazelcastAtomicResource.class);
+
+ @Inject
+ ProducerTemplate producerTemplate;
+
+ @PUT
+ @Path("{value}")
+ public Response set(@PathParam("value") Long value) {
+ LOG.infof("setting atomic long value %s", value);
+ producerTemplate.sendBodyAndHeader(
+ "hazelcast-atomicvalue:foo-atomic",
+ value, HazelcastConstants.OPERATION, HazelcastOperation.SET_VALUE);
+ return Response.accepted().build();
+ }
+
+ @GET()
+ public Long get() {
+ LOG.infof("getting one atomic value");
+ Long value = producerTemplate.requestBodyAndHeader(
+ "hazelcast-atomicvalue:foo-atomic",
+ null, HazelcastConstants.OPERATION, HazelcastOperation.GET, Long.class);
+ return value;
+ }
+
+ @GET
+ @Path("increment")
+ public Long incrementAndGet() {
+ LOG.infof("increment and get new value");
+ Long value = producerTemplate.requestBodyAndHeader(
+ "hazelcast-atomicvalue:foo-atomic",
+ null, HazelcastConstants.OPERATION, HazelcastOperation.INCREMENT, Long.class);
+ return value;
+ }
+
+ @GET
+ @Path("decrement")
+ public Long decrementAndGet() {
+ LOG.infof("decrement and get new value");
+ Long value = producerTemplate.requestBodyAndHeader(
+ "hazelcast-atomicvalue:foo-atomic",
+ null, HazelcastConstants.OPERATION, HazelcastOperation.DECREMENT, Long.class);
+ return value;
+ }
+
+ @DELETE
+ public Response destroy() {
+ LOG.infof("destroy atomic value");
+ producerTemplate.sendBodyAndHeader("hazelcast-atomicvalue:foo-atomic",
+ null, HazelcastConstants.OPERATION, HazelcastOperation.DESTROY);
+ return Response.accepted().build();
+ }
+}
diff --git a/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastListResource.java b/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastListResource.java
new file mode 100644
index 0000000..ecd28b8
--- /dev/null
+++ b/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastListResource.java
@@ -0,0 +1,73 @@
+/*
+ * 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.hazelcast.it;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.event.Observes;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import io.quarkus.runtime.StartupEvent;
+import org.apache.camel.component.hazelcast.HazelcastConstants;
+import org.apache.camel.component.hazelcast.HazelcastOperation;
+
+import static org.apache.camel.quarkus.component.hazelcast.it.HazelcastRoutes.MOCK_LIST_ADDED;
+import static org.apache.camel.quarkus.component.hazelcast.it.HazelcastRoutes.MOCK_LIST_DELETED;
+
+@Path("/hazelcast/list")
+@ApplicationScoped
+@Produces(MediaType.APPLICATION_JSON)
+@Consumes(MediaType.APPLICATION_JSON)
+public class HazelcastListResource extends AbstractHazelcastCollectionResource {
+
+ @Override
+ public void init(@Observes StartupEvent startupEvent) {
+ endpointUri = "hazelcast-list:foo-list";
+ mockAddedEndpoint = MOCK_LIST_ADDED;
+ mockDeletedEndpoint = MOCK_LIST_DELETED;
+ }
+
+ @GET
+ @Path("{index}")
+ public String getByIndex(@PathParam("index") Integer index) {
+ Map<String, Object> headers = new HashMap<>();
+ headers.put(HazelcastConstants.OPERATION, HazelcastOperation.GET);
+ headers.put(HazelcastConstants.OBJECT_POS, index);
+ return producerTemplate.requestBodyAndHeaders(endpointUri, null, headers,
+ String.class);
+ }
+
+ @DELETE
+ @Path("index")
+ public Response delete(Integer index) {
+ Map<String, Object> headers = new HashMap<>();
+ headers.put(HazelcastConstants.OPERATION, HazelcastOperation.REMOVE_VALUE);
+ headers.put(HazelcastConstants.OBJECT_POS, index);
+ producerTemplate.sendBodyAndHeaders(endpointUri, null, headers);
+ return Response.accepted().build();
+ }
+
+}
diff --git a/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastMapResource.java b/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastMapResource.java
new file mode 100644
index 0000000..454c4a9
--- /dev/null
+++ b/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastMapResource.java
@@ -0,0 +1,118 @@
+/*
+ * 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.hazelcast.it;
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.event.Observes;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import io.quarkus.runtime.StartupEvent;
+import org.apache.camel.component.hazelcast.HazelcastConstants;
+import org.apache.camel.component.hazelcast.HazelcastOperation;
+
+import static org.apache.camel.quarkus.component.hazelcast.it.HazelcastRoutes.MOCK_MAP_ADDED;
+import static org.apache.camel.quarkus.component.hazelcast.it.HazelcastRoutes.MOCK_MAP_DELETED;
+import static org.apache.camel.quarkus.component.hazelcast.it.HazelcastRoutes.MOCK_MAP_EVICTED;
+import static org.apache.camel.quarkus.component.hazelcast.it.HazelcastRoutes.MOCK_MAP_UPDATED;
+
+@Path("/hazelcast/map")
+@ApplicationScoped
+@Produces(MediaType.APPLICATION_JSON)
+@Consumes(MediaType.APPLICATION_JSON)
+public class HazelcastMapResource extends AbstractHazelcastMapResource {
+
+ @Override
+ public void init(@Observes StartupEvent startupEvent) {
+ endpointUri = "hazelcast-map:foo-map";
+ mockAddedEndpoint = MOCK_MAP_ADDED;
+ mockDeletedEndpoint = MOCK_MAP_DELETED;
+ mockEvictedEndpoint = MOCK_MAP_EVICTED;
+ mockUpdatedEndpoint = MOCK_MAP_UPDATED;
+ }
+
+ @POST
+ @Path("get")
+ public Map getAll(Set oids) {
+ Map<String, Object> headers = new HashMap<>();
+ headers.put(HazelcastConstants.OPERATION, HazelcastOperation.GET_ALL);
+ headers.put(HazelcastConstants.OBJECT_ID, oids);
+ return producerTemplate.requestBodyAndHeaders(endpointUri, null, headers, Map.class);
+ }
+
+ @GET
+ @Path("updated")
+ public List getUpdatedValues() {
+ return getValues(mockUpdatedEndpoint);
+ }
+
+ @GET
+ @Path("evict/{id}")
+ public Response evict(@PathParam("id") String id) {
+ Map<String, Object> headers = new HashMap<>();
+ headers.put(HazelcastConstants.OPERATION, HazelcastOperation.EVICT);
+ headers.put(HazelcastConstants.OBJECT_ID, id);
+ producerTemplate.sendBodyAndHeaders(endpointUri, null, headers);
+ return Response.accepted().build();
+ }
+
+ @GET
+ @Path("evict")
+ public Response evict() {
+ Map<String, Object> headers = new HashMap<>();
+ headers.put(HazelcastConstants.OPERATION, HazelcastOperation.EVICT_ALL);
+ producerTemplate.sendBodyAndHeaders(endpointUri, "", headers);
+ return Response.accepted().build();
+ }
+
+ @GET
+ @Path("evicted")
+ public List getEvictedValues() {
+ return getValues(mockEvictedEndpoint);
+ }
+
+ @POST
+ @Path("get/query")
+ public Collection query(String sqlQuery) {
+ Map<String, Object> headers = new HashMap<>();
+ headers.put(HazelcastConstants.OPERATION, HazelcastOperation.QUERY);
+ headers.put(HazelcastConstants.QUERY, sqlQuery);
+ return producerTemplate.requestBodyAndHeaders(endpointUri, null, headers, Collection.class);
+ }
+
+ @POST
+ @Path("update/{id}")
+ public Response update(@PathParam("id") String id, String value) {
+ Map<String, Object> headers = new HashMap<>();
+ headers.put(HazelcastConstants.OPERATION, HazelcastOperation.UPDATE);
+ headers.put(HazelcastConstants.OBJECT_ID, id);
+ producerTemplate.sendBodyAndHeaders(endpointUri, value, headers);
+ return Response.accepted().build();
+ }
+}
diff --git a/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastMultimapResource.java b/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastMultimapResource.java
new file mode 100644
index 0000000..aca0314
--- /dev/null
+++ b/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastMultimapResource.java
@@ -0,0 +1,71 @@
+/*
+ * 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.hazelcast.it;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.event.Observes;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import io.quarkus.runtime.StartupEvent;
+import org.apache.camel.component.hazelcast.HazelcastConstants;
+import org.apache.camel.component.hazelcast.HazelcastOperation;
+
+import static org.apache.camel.quarkus.component.hazelcast.it.HazelcastRoutes.MOCK_MULTIMAP_ADDED;
+import static org.apache.camel.quarkus.component.hazelcast.it.HazelcastRoutes.MOCK_MULTIMAP_DELETED;
+
+@Path("/hazelcast/multi-map")
+@ApplicationScoped
+@Produces(MediaType.APPLICATION_JSON)
+@Consumes(MediaType.APPLICATION_JSON)
+public class HazelcastMultimapResource extends AbstractHazelcastMapResource {
+
+ @Override
+ public void init(@Observes StartupEvent startupEvent) {
+ endpointUri = "hazelcast-multimap:foo-multimap";
+ mockAddedEndpoint = MOCK_MULTIMAP_ADDED;
+ mockDeletedEndpoint = MOCK_MULTIMAP_DELETED;
+ }
+
+ @GET
+ @Path("count/{id}")
+ public Integer count(@PathParam("id") String id) {
+ Map<String, Object> headers = new HashMap<>();
+ headers.put(HazelcastConstants.OPERATION, HazelcastOperation.VALUE_COUNT);
+ headers.put(HazelcastConstants.OBJECT_ID, id);
+ return producerTemplate.requestBodyAndHeaders(endpointUri, "", headers, Integer.class);
+ }
+
+ @DELETE
+ @Path("value/{id}")
+ public Response removeValue(@PathParam("id") String id, String value) {
+ Map<String, Object> headers = new HashMap<>();
+ headers.put(HazelcastConstants.OPERATION, HazelcastOperation.REMOVE_VALUE);
+ headers.put(HazelcastConstants.OBJECT_ID, id);
+ producerTemplate.sendBodyAndHeaders(endpointUri, value, headers);
+ return Response.accepted().build();
+ }
+}
diff --git a/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastReplicatedMapResource.java b/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastReplicatedMapResource.java
new file mode 100644
index 0000000..b69cccc
--- /dev/null
+++ b/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastReplicatedMapResource.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.hazelcast.it;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.event.Observes;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+import io.quarkus.runtime.StartupEvent;
+
+import static org.apache.camel.quarkus.component.hazelcast.it.HazelcastRoutes.MOCK_REPLICATED_ADDED;
+import static org.apache.camel.quarkus.component.hazelcast.it.HazelcastRoutes.MOCK_REPLICATED_DELETED;
+
+@Path("/hazelcast/replicatedmap")
+@ApplicationScoped
+@Produces(MediaType.APPLICATION_JSON)
+@Consumes(MediaType.APPLICATION_JSON)
+public class HazelcastReplicatedMapResource extends AbstractHazelcastMapResource {
+ @Override
+ public void init(@Observes StartupEvent startupEvent) {
+ endpointUri = "hazelcast-replicatedmap:foo-replicate";
+ mockAddedEndpoint = MOCK_REPLICATED_ADDED;
+ mockDeletedEndpoint = MOCK_REPLICATED_DELETED;
+ }
+}
diff --git a/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastRoutes.java b/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastRoutes.java
new file mode 100644
index 0000000..ef9e212
--- /dev/null
+++ b/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastRoutes.java
@@ -0,0 +1,189 @@
+/*
+ * 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.hazelcast.it;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.inject.Named;
+import javax.ws.rs.Produces;
+
+import com.hazelcast.core.HazelcastInstance;
+import io.quarkus.arc.Unremovable;
+import org.apache.camel.builder.RouteBuilder;
+import org.apache.camel.component.hazelcast.HazelcastConstants;
+import org.apache.camel.component.hazelcast.HazelcastDefaultComponent;
+import org.apache.camel.component.hazelcast.atomicnumber.HazelcastAtomicnumberComponent;
+import org.apache.camel.component.hazelcast.instance.HazelcastInstanceComponent;
+import org.apache.camel.component.hazelcast.list.HazelcastListComponent;
+import org.apache.camel.component.hazelcast.map.HazelcastMapComponent;
+import org.apache.camel.component.hazelcast.multimap.HazelcastMultimapComponent;
+import org.apache.camel.component.hazelcast.replicatedmap.HazelcastReplicatedmapComponent;
+import org.apache.camel.component.hazelcast.set.HazelcastSetComponent;
+import org.apache.camel.component.hazelcast.topic.HazelcastTopicComponent;
+
+@ApplicationScoped
+public class HazelcastRoutes extends RouteBuilder {
+ public static final String MOCK_LIST_ADDED = "mock:list-added";
+ public static final String MOCK_LIST_DELETED = "mock:list-removed";
+ public static final String MOCK_SET_ADDED = "mock:set-added";
+ public static final String MOCK_SET_DELETED = "mock:set-removed";
+ public static final String MOCK_MAP_ADDED = "mock:map-added";
+ public static final String MOCK_MAP_DELETED = "mock:map-removed";
+ public static final String MOCK_MAP_UPDATED = "mock:map-updated";
+ public static final String MOCK_MAP_EVICTED = "mock:map-evicted";
+ public static final String MOCK_MULTIMAP_ADDED = "mock:multimap-added";
+ public static final String MOCK_MULTIMAP_DELETED = "mock:multimap-removed";
+ public static final String MOCK_REPLICATED_ADDED = "mock:replicatedmap-added";
+ public static final String MOCK_REPLICATED_DELETED = "mock:replicatedmap-removed";
+ public static final String MOCK_TOPIC_RECEIVED = "mock:topic-received";
+
+ @Inject
+ HazelcastInstance hazelcastInstance;
+
+ @Produces
+ @ApplicationScoped
+ @Unremovable
+ @Named("hazelcast-instance")
+ HazelcastDefaultComponent hazelcastInstance() {
+ final HazelcastInstanceComponent hazelcastComponent = new HazelcastInstanceComponent();
+ return configureHazelcastComponent(hazelcastComponent);
+ }
+
+ @Produces
+ @ApplicationScoped
+ @Unremovable
+ @Named("hazelcast-atomicvalue")
+ HazelcastDefaultComponent hazelcastAtomicnumber() {
+ final HazelcastAtomicnumberComponent hazelcastComponent = new HazelcastAtomicnumberComponent();
+ return configureHazelcastComponent(hazelcastComponent);
+ }
+
+ @Produces
+ @ApplicationScoped
+ @Unremovable
+ @Named("hazelcast-list")
+ HazelcastDefaultComponent hazelcastList() {
+ final HazelcastListComponent hazelcastComponent = new HazelcastListComponent();
+ return configureHazelcastComponent(hazelcastComponent);
+ }
+
+ @Produces
+ @ApplicationScoped
+ @Unremovable
+ @Named("hazelcast-map")
+ HazelcastDefaultComponent hazelcastMap() {
+ final HazelcastMapComponent hazelcastComponent = new HazelcastMapComponent();
+ return configureHazelcastComponent(hazelcastComponent);
+ }
+
+ @Produces
+ @ApplicationScoped
+ @Unremovable
+ @Named("hazelcast-multimap")
+ HazelcastDefaultComponent hazelcastMultimap() {
+ final HazelcastMultimapComponent hazelcastComponent = new HazelcastMultimapComponent();
+ return configureHazelcastComponent(hazelcastComponent);
+ }
+
+ @Produces
+ @ApplicationScoped
+ @Unremovable
+ @Named("hazelcast-replicatedmap")
+ HazelcastDefaultComponent hazelcastReplicatedmap() {
+ final HazelcastReplicatedmapComponent hazelcastComponent = new HazelcastReplicatedmapComponent();
+ return configureHazelcastComponent(hazelcastComponent);
+ }
+
+ @Produces
+ @ApplicationScoped
+ @Unremovable
+ @Named("hazelcast-set")
+ HazelcastDefaultComponent hazelcastSet() {
+ final HazelcastSetComponent hazelcastComponent = new HazelcastSetComponent();
+ return configureHazelcastComponent(hazelcastComponent);
+ }
+
+ @Produces
+ @ApplicationScoped
+ @Unremovable
+ @Named("hazelcast-topic")
+ HazelcastDefaultComponent hazelcastTopic() {
+ final HazelcastTopicComponent hazelcastComponent = new HazelcastTopicComponent();
+ return configureHazelcastComponent(hazelcastComponent);
+ }
+
+ private HazelcastDefaultComponent configureHazelcastComponent(HazelcastDefaultComponent hazelcastComponent) {
+ // pass the hazelcast generated by the hazelcast extension
+ hazelcastComponent.setHazelcastInstance(hazelcastInstance);
+ // sets the mode to "client"
+ hazelcastComponent.setHazelcastMode(HazelcastConstants.HAZELCAST_CLIENT_MODE);
+ return hazelcastComponent;
+ }
+
+ @Override
+ public void configure() throws Exception {
+ // HazelcastListConsumer
+ from("hazelcast-list:foo-list").log("object...").choice()
+ .when(header(HazelcastConstants.LISTENER_ACTION).isEqualTo(HazelcastConstants.ADDED))
+ .log("...added").to(MOCK_LIST_ADDED)
+ .when(header(HazelcastConstants.LISTENER_ACTION).isEqualTo(HazelcastConstants.REMOVED))
+ .log("...removed").to(MOCK_LIST_DELETED).otherwise()
+ .log("fail!");
+
+ // HazelcastMapConsumer
+ from("hazelcast-map:foo-map").log("object...").choice()
+ .when(header(HazelcastConstants.LISTENER_ACTION).isEqualTo(HazelcastConstants.ADDED))
+ .log("...added").to(MOCK_MAP_ADDED)
+ .when(header(HazelcastConstants.LISTENER_ACTION).isEqualTo(HazelcastConstants.EVICTED))
+ .log("...evicted").to(MOCK_MAP_EVICTED)
+ .when(header(HazelcastConstants.LISTENER_ACTION).isEqualTo(HazelcastConstants.UPDATED))
+ .log("...updated").to(MOCK_MAP_UPDATED)
+ .when(header(HazelcastConstants.LISTENER_ACTION).isEqualTo(HazelcastConstants.REMOVED))
+ .log("...removed").to(MOCK_MAP_DELETED)
+ .otherwise().log("fail!");
+
+ //HazelcastMultimapConsumer
+ from("hazelcast-multimap:foo-multimap").log("object...").choice()
+ .when(header(HazelcastConstants.LISTENER_ACTION).isEqualTo(HazelcastConstants.ADDED)).log("...added")
+ .to(MOCK_MULTIMAP_ADDED)
+ .when(header(HazelcastConstants.LISTENER_ACTION).isEqualTo(HazelcastConstants.REMOVED))
+ .log("...removed").to(MOCK_MULTIMAP_DELETED).otherwise().log("fail!");
+
+ //HazelcastReplicatedmapConsumer
+ from("hazelcast-replicatedmap:foo-replicate").log("object...").choice()
+ .when(header(HazelcastConstants.LISTENER_ACTION).isEqualTo(HazelcastConstants.ADDED)).log("...added")
+ .to(MOCK_REPLICATED_ADDED)
+ .when(header(HazelcastConstants.LISTENER_ACTION).isEqualTo(HazelcastConstants.REMOVED))
+ .log("...removed").to(MOCK_REPLICATED_DELETED).otherwise().log("fail!");
+
+ // HazelcastSetConsumer
+ from("hazelcast-set:foo-set").log("object...").choice()
+ .when(header(HazelcastConstants.LISTENER_ACTION).isEqualTo(HazelcastConstants.ADDED))
+ .log("...added").to(MOCK_SET_ADDED)
+ .when(header(HazelcastConstants.LISTENER_ACTION).isEqualTo(HazelcastConstants.REMOVED))
+ .log("...removed").to(MOCK_SET_DELETED).otherwise()
+ .log("fail!");
+
+ //HazelcastTopicConsumer
+ from("hazelcast-topic:foo-topic").log("object...")
+ .choice()
+ .when(header(HazelcastConstants.LISTENER_ACTION).isEqualTo(HazelcastConstants.RECEIVED))
+ .log("...received").to(MOCK_TOPIC_RECEIVED)
+ .otherwise()
+ .log("fail!");
+ }
+}
diff --git a/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastSetResource.java b/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastSetResource.java
new file mode 100644
index 0000000..afeca45
--- /dev/null
+++ b/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastSetResource.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.hazelcast.it;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.enterprise.event.Observes;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+
+import io.quarkus.runtime.StartupEvent;
+
+import static org.apache.camel.quarkus.component.hazelcast.it.HazelcastRoutes.MOCK_SET_ADDED;
+import static org.apache.camel.quarkus.component.hazelcast.it.HazelcastRoutes.MOCK_SET_DELETED;
+
+@Path("/hazelcast/set")
+@ApplicationScoped
+@Produces(MediaType.APPLICATION_JSON)
+@Consumes(MediaType.APPLICATION_JSON)
+public class HazelcastSetResource extends AbstractHazelcastCollectionResource {
+ @Override
+ public void init(@Observes StartupEvent startupEvent) {
+ endpointUri = "hazelcast-set:foo-set";
+ mockAddedEndpoint = MOCK_SET_ADDED;
+ mockDeletedEndpoint = MOCK_SET_DELETED;
+ }
+}
diff --git a/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastTopicResource.java b/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastTopicResource.java
new file mode 100644
index 0000000..3ce0671
--- /dev/null
+++ b/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastTopicResource.java
@@ -0,0 +1,68 @@
+/*
+ * 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.hazelcast.it;
+
+import java.util.List;
+import java.util.stream.Collectors;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import com.hazelcast.topic.impl.DataAwareMessage;
+import org.apache.camel.CamelContext;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.component.hazelcast.HazelcastConstants;
+import org.apache.camel.component.hazelcast.HazelcastOperation;
+import org.apache.camel.component.mock.MockEndpoint;
+
+import static org.apache.camel.quarkus.component.hazelcast.it.HazelcastRoutes.MOCK_TOPIC_RECEIVED;
+
+@Path("/hazelcast/topic")
+@ApplicationScoped
+@Produces(MediaType.APPLICATION_JSON)
+@Consumes(MediaType.APPLICATION_JSON)
+public class HazelcastTopicResource {
+
+ @Inject
+ ProducerTemplate producerTemplate;
+
+ @Inject
+ CamelContext context;
+
+ @POST
+ public Response publish(String message) {
+ producerTemplate.sendBodyAndHeader("hazelcast-topic:foo-topic", message, HazelcastConstants.OPERATION,
+ HazelcastOperation.PUBLISH);
+ return Response.accepted().build();
+ }
+
+ @GET
+ public List getValues() {
+ MockEndpoint mockEndpoint = context.getEndpoint(MOCK_TOPIC_RECEIVED, MockEndpoint.class);
+ List<Object> values = mockEndpoint.getReceivedExchanges().stream().map(
+ exchange -> exchange.getMessage().getBody(DataAwareMessage.class).getMessageObject())
+ .collect(Collectors.toList());
+ return values;
+ }
+}
diff --git a/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/model/HazelcastMapRequest.java b/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/model/HazelcastMapRequest.java
new file mode 100644
index 0000000..95ddd27
--- /dev/null
+++ b/integration-tests/hazelcast/src/main/java/org/apache/camel/quarkus/component/hazelcast/it/model/HazelcastMapRequest.java
@@ -0,0 +1,77 @@
+/*
+ * 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.hazelcast.it.model;
+
+import java.util.concurrent.TimeUnit;
+
+public class HazelcastMapRequest {
+ private String id;
+ private Object value;
+ private Long ttl;
+ private TimeUnit ttlUnit;
+
+ public HazelcastMapRequest() {
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public Object getValue() {
+ return value;
+ }
+
+ public void setValue(Object value) {
+ this.value = value;
+ }
+
+ public Long getTtl() {
+ return ttl;
+ }
+
+ public void setTtl(Long ttl) {
+ this.ttl = ttl;
+ }
+
+ public TimeUnit getTtlUnit() {
+ return ttlUnit;
+ }
+
+ public void setTtlUnit(TimeUnit ttlUnit) {
+ this.ttlUnit = ttlUnit;
+ }
+
+ public HazelcastMapRequest withId(String id) {
+ setId(id);
+ return this;
+ }
+
+ public HazelcastMapRequest withVaLue(Object value) {
+ setValue(value);
+ return this;
+ }
+
+ public HazelcastMapRequest withTtl(Long ttl, TimeUnit ttlUnit) {
+ setTtl(ttl);
+ setTtlUnit(ttlUnit);
+ return this;
+ }
+}
diff --git a/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastAtomicIT.java b/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastAtomicIT.java
new file mode 100644
index 0000000..d7ece86
--- /dev/null
+++ b/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastAtomicIT.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.hazelcast.it;
+
+import io.quarkus.test.junit.NativeImageTest;
+
+@NativeImageTest
+class HazelcastAtomicIT extends HazelcastAtomicTest {
+
+}
diff --git a/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastAtomicTest.java b/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastAtomicTest.java
new file mode 100644
index 0000000..3ca5324
--- /dev/null
+++ b/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastAtomicTest.java
@@ -0,0 +1,71 @@
+/*
+ * 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.hazelcast.it;
+
+import io.quarkus.test.common.QuarkusTestResource;
+import io.quarkus.test.common.http.TestHTTPEndpoint;
+import io.quarkus.test.hazelcast.HazelcastServerTestResource;
+import io.quarkus.test.junit.QuarkusTest;
+import org.junit.jupiter.api.Test;
+
+import static io.restassured.RestAssured.given;
+import static org.hamcrest.Matchers.equalTo;
+
+@QuarkusTest
+@TestHTTPEndpoint(HazelcastAtomicResource.class)
+@QuarkusTestResource(HazelcastServerTestResource.class)
+class HazelcastAtomicTest {
+ @Test
+ public void testAtomicLong() {
+
+ // set value
+ given()
+ .when()
+ .put("/4711")
+ .then()
+ .statusCode(202);
+
+ // get value
+ given()
+ .when()
+ .get()
+ .then()
+ .body(equalTo("4711"));
+
+ // increment and get new value
+ given()
+ .when()
+ .get("/increment")
+ .then()
+ .body(equalTo("4712"));
+
+ // decrement and get new value
+ given()
+ .when()
+ .get("/decrement")
+ .then()
+ .body(equalTo("4711"));
+
+ // destroy value
+ given()
+ .when()
+ .delete()
+ .then()
+ .statusCode(202);
+
+ }
+}
diff --git a/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastListIT.java b/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastListIT.java
new file mode 100644
index 0000000..57aa10c
--- /dev/null
+++ b/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastListIT.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.hazelcast.it;
+
+import io.quarkus.test.junit.NativeImageTest;
+
+@NativeImageTest
+public class HazelcastListIT extends HazelcastListTest {
+}
diff --git a/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastListTest.java b/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastListTest.java
new file mode 100644
index 0000000..c38faba
--- /dev/null
+++ b/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastListTest.java
@@ -0,0 +1,153 @@
+/*
+ * 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.hazelcast.it;
+
+import java.util.Arrays;
+
+import io.quarkus.test.common.QuarkusTestResource;
+import io.quarkus.test.common.http.TestHTTPEndpoint;
+import io.quarkus.test.hazelcast.HazelcastServerTestResource;
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.http.ContentType;
+import org.junit.jupiter.api.Test;
+
+import static io.restassured.RestAssured.given;
+import static org.hamcrest.Matchers.equalTo;
+import static org.hamcrest.Matchers.hasItems;
+import static org.hamcrest.Matchers.hasSize;
+
+@QuarkusTest
+@TestHTTPEndpoint(HazelcastListResource.class)
+@QuarkusTestResource(HazelcastServerTestResource.class)
+public class HazelcastListTest {
+
+ @Test
+ public void testList() {
+ // add one value
+ given()
+ .contentType(ContentType.JSON)
+ .body("foo1")
+ .when()
+ .put()
+ .then()
+ .statusCode(202);
+
+ // find value :: should be first value
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/0")
+ .then()
+ .body(equalTo("foo1"));
+
+ // remove value by index
+ given()
+ .contentType(ContentType.JSON)
+ .body(0)
+ .when()
+ .delete("/index")
+ .then()
+ .statusCode(202);
+
+ // add all values
+ given()
+ .contentType(ContentType.JSON)
+ .body(Arrays.asList("foo2", "foo3"))
+ .when()
+ .put("/all")
+ .then()
+ .statusCode(202);
+
+ // find values
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/0")
+ .then()
+ .body(equalTo("foo2"));
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/1")
+ .then()
+ .body(equalTo("foo3"));
+
+ // remove value foo2
+ given()
+ .contentType(ContentType.JSON)
+ .body("foo2")
+ .when()
+ .delete("/value")
+ .then()
+ .statusCode(202);
+
+ // foo3 must be on index 0 now
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/0")
+ .then()
+ .body(equalTo("foo3"));
+
+ // delete all
+ given()
+ .contentType(ContentType.JSON)
+ .body(Arrays.asList("foo3"))
+ .when()
+ .delete("/all")
+ .then()
+ .statusCode(202);
+
+ // add multiple values
+ given()
+ .contentType(ContentType.JSON)
+ .body(Arrays.asList("foo4", "foo5", "foo6", "foo7"))
+ .when()
+ .put("/all")
+ .then()
+ .statusCode(202);
+
+ // retain only 2 : should delete foo5 and foo6
+ given()
+ .contentType(ContentType.JSON)
+ .body(Arrays.asList("foo4", "foo7"))
+ .when()
+ .post("/retain")
+ .then()
+ .statusCode(202);
+
+ // verify that the consumer has received all added values
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/added")
+ .then()
+ .body("$", hasSize(7))
+ .body("$", hasItems("foo1", "foo2", "foo3", "foo4", "foo5", "foo6", "foo7"));
+
+ // verify that the consumer has received all removed values
+ // we can't expect foo1 because we gave it just the index, not the value. but the size should be 5
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/deleted")
+ .then()
+ .body("$", hasSize(5))
+ .body("$", hasItems("foo2", "foo3", "foo5", "foo6"));
+ }
+
+}
diff --git a/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastMapIT.java b/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastMapIT.java
new file mode 100644
index 0000000..c5fafdd
--- /dev/null
+++ b/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastMapIT.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.hazelcast.it;
+
+import io.quarkus.test.junit.NativeImageTest;
+
+@NativeImageTest
+public class HazelcastMapIT extends HazelcastMapTest {
+}
diff --git a/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastMapTest.java b/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastMapTest.java
new file mode 100644
index 0000000..96b9615
--- /dev/null
+++ b/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastMapTest.java
@@ -0,0 +1,205 @@
+/*
+ * 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.hazelcast.it;
+
+import java.util.Arrays;
+import java.util.concurrent.TimeUnit;
+
+import io.quarkus.test.common.QuarkusTestResource;
+import io.quarkus.test.common.http.TestHTTPEndpoint;
+import io.quarkus.test.hazelcast.HazelcastServerTestResource;
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.http.ContentType;
+import org.apache.camel.quarkus.component.hazelcast.it.model.HazelcastMapRequest;
+import org.junit.jupiter.api.Test;
+
+import static io.restassured.RestAssured.given;
+import static org.hamcrest.Matchers.equalTo;
+import static org.hamcrest.Matchers.hasItems;
+import static org.hamcrest.Matchers.hasSize;
+
+@QuarkusTest
+@TestHTTPEndpoint(HazelcastMapResource.class)
+@QuarkusTestResource(HazelcastServerTestResource.class)
+public class HazelcastMapTest {
+
+ @Test
+ public void testMap() {
+ // add one value
+ HazelcastMapRequest request = new HazelcastMapRequest().withVaLue("val1").withId("1");
+ given()
+ .contentType(ContentType.JSON)
+ .body(request)
+ .when()
+ .post("/add")
+ .then()
+ .statusCode(202);
+
+ // get value with id
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/get/1")
+ .then()
+ .body(equalTo("val1"));
+
+ // add one value with TTL
+ request = request.withId("2")
+ .withVaLue("val2")
+ .withTtl(Long.valueOf(5), TimeUnit.MINUTES);
+ given()
+ .contentType(ContentType.JSON)
+ .body(request)
+ .when()
+ .post("/add")
+ .then()
+ .statusCode(202);
+
+ // get all values
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .body(Arrays.asList("1", "2"))
+ .post("/get")
+ .then()
+ .body("1", equalTo("val1"))
+ .body("2", equalTo("val2"));
+
+ // verify that map contains key "1"
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/key/1")
+ .then()
+ .body(equalTo("true"));
+
+ // verify that map doesn't contain key "3"
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/key/3")
+ .then()
+ .body(equalTo("false"));
+
+ // verify that map contains value "val1"
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/value/val1")
+ .then()
+ .body(equalTo("true"));
+
+ // verify that map doesn't contain value "val3"
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/value/val3")
+ .then()
+ .body(equalTo("false"));
+
+ // remove value by key
+ given()
+ .when()
+ .delete("/1")
+ .then()
+ .statusCode(202);
+
+ // verify that map doesn't contain key "1"
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/key/1")
+ .then()
+ .body(equalTo("false"));
+
+ // update key 2
+ given()
+ .contentType(ContentType.JSON)
+ .body("new val2")
+ .when()
+ .post("/update/2")
+ .then()
+ .statusCode(202);
+
+ // get new value with key 2
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/get/2")
+ .then()
+ .body(equalTo("new val2"));
+
+ // evict key 2
+ given()
+ .when()
+ .get("/evict/2")
+ .then()
+ .statusCode(202);
+
+ // verify that map doesn't contain key "2"
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/key/2")
+ .then()
+ .body(equalTo("false"));
+
+ // clear
+ given()
+ .when()
+ .get("/clear")
+ .then()
+ .statusCode(202);
+
+ // verify that the consumer has received all the added values
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/added")
+ .then()
+ .body("$", hasSize(2))
+ .body("$", hasItems("1", "2"));
+
+ // verify that the consumer has received one removed value with key = 1
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/deleted")
+ .then()
+ .body("$", hasSize(1))
+ .body("$", hasItems("1"));
+
+ // verify that the consumer has received one evicted value with key = 2
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/evicted")
+ .then()
+ .body("$", hasSize(1))
+ .body("$", hasItems("2"));
+
+ // verify that the consumer has received one updated value with key = 2
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/updated")
+ .then()
+ .body("$", hasSize(1))
+ .body("$", hasItems("2"));
+ }
+
+}
diff --git a/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastMultimapIT.java b/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastMultimapIT.java
new file mode 100644
index 0000000..cad8f4a
--- /dev/null
+++ b/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastMultimapIT.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.hazelcast.it;
+
+import io.quarkus.test.junit.NativeImageTest;
+
+@NativeImageTest
+public class HazelcastMultimapIT extends HazelcastMultimapTest {
+}
diff --git a/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastMultimapTest.java b/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastMultimapTest.java
new file mode 100644
index 0000000..8e330c0
--- /dev/null
+++ b/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastMultimapTest.java
@@ -0,0 +1,182 @@
+/*
+ * 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.hazelcast.it;
+
+import java.util.concurrent.TimeUnit;
+
+import io.quarkus.test.common.QuarkusTestResource;
+import io.quarkus.test.common.http.TestHTTPEndpoint;
+import io.quarkus.test.hazelcast.HazelcastServerTestResource;
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.http.ContentType;
+import org.apache.camel.quarkus.component.hazelcast.it.model.HazelcastMapRequest;
+import org.junit.jupiter.api.Test;
+
+import static io.restassured.RestAssured.given;
+import static org.hamcrest.Matchers.equalTo;
+import static org.hamcrest.Matchers.hasItems;
+import static org.hamcrest.Matchers.hasSize;
+
+@QuarkusTest
+@TestHTTPEndpoint(HazelcastMultimapResource.class)
+@QuarkusTestResource(HazelcastServerTestResource.class)
+public class HazelcastMultimapTest {
+
+ @Test
+ public void testMultimap() {
+ // add one value
+ HazelcastMapRequest request = new HazelcastMapRequest().withVaLue("val1.1").withId("1");
+ given()
+ .contentType(ContentType.JSON)
+ .body(request)
+ .when()
+ .post("/add")
+ .then()
+ .statusCode(202);
+
+ // get values with key "1"
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/get/1")
+ .then()
+ .body("$", hasSize(1))
+ .body("$", hasItems("val1.1"));
+
+ // add a second value to the key "1"
+ request = request.withVaLue("val1.2");
+ given()
+ .contentType(ContentType.JSON)
+ .body(request)
+ .when()
+ .post("/add")
+ .then()
+ .statusCode(202);
+
+ // get values with key "1"
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/get/1")
+ .then()
+ .body("$", hasSize(2))
+ .body("$", hasItems("val1.1"))
+ .body("$", hasItems("val1.2"));
+
+ // count values for key=1
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/count/1")
+ .then()
+ .body(equalTo("2"));
+
+ // verify that map contains key "1"
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/key/1")
+ .then()
+ .body(equalTo("true"));
+
+ // verify that map contains value "val1.1"
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/value/val1.1")
+ .then()
+ .body(equalTo("true"));
+
+ // remove one value
+ given()
+ .contentType(ContentType.JSON)
+ .body("val1.1")
+ .when()
+ .delete("/value/1")
+ .then()
+ .statusCode(202);
+
+ // count nb values within key "1"
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/count/1")
+ .then()
+ .body(equalTo("1"));
+
+ // add value with TTL
+ request = request.withId("2")
+ .withVaLue("val2.1")
+ .withTtl(Long.valueOf(5), TimeUnit.MINUTES);
+ given()
+ .contentType(ContentType.JSON)
+ .body(request)
+ .when()
+ .post("/add")
+ .then()
+ .statusCode(202);
+
+ // get value of key "2"
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/get/2")
+ .then()
+ .body("$", hasSize(1))
+ .body("$", hasItems("val2.1"));
+
+ // remove value by id
+ given()
+ .when()
+ .delete("/1")
+ .then()
+ .statusCode(202);
+
+ // verify that map doesn't key "1" anymore
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/key/1")
+ .then()
+ .body(equalTo("false"));
+
+ // clear
+ given()
+ .when()
+ .get("/clear")
+ .then()
+ .statusCode(202);
+
+ // verify that the consumer has received all the added values
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/added")
+ .then()
+ .body("$", hasSize(3))
+ .body("$", hasItems("1", "2"));
+
+ // verify that the consumer has received one removed value with key = 1
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/deleted")
+ .then()
+ .body("$", hasSize(2))
+ .body("$", hasItems("1"));
+ }
+}
diff --git a/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastReplicatedmapTest.java b/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastReplicatedmapTest.java
new file mode 100644
index 0000000..2558ab3
--- /dev/null
+++ b/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastReplicatedmapTest.java
@@ -0,0 +1,124 @@
+/*
+ * 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.hazelcast.it;
+
+import java.util.concurrent.TimeUnit;
+
+import io.quarkus.test.common.QuarkusTestResource;
+import io.quarkus.test.common.http.TestHTTPEndpoint;
+import io.quarkus.test.hazelcast.HazelcastServerTestResource;
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.http.ContentType;
+import org.apache.camel.quarkus.component.hazelcast.it.model.HazelcastMapRequest;
+import org.junit.jupiter.api.Test;
+
+import static io.restassured.RestAssured.given;
+import static org.hamcrest.Matchers.equalTo;
+
+@QuarkusTest
+@TestHTTPEndpoint(HazelcastReplicatedMapResource.class)
+@QuarkusTestResource(HazelcastServerTestResource.class)
+public class HazelcastReplicatedmapTest {
+
+ @Test
+ public void testReplicatedmap() {
+ // add one value
+ HazelcastMapRequest request = new HazelcastMapRequest().withVaLue("val1").withId("1");
+ given()
+ .contentType(ContentType.JSON)
+ .body(request)
+ .when()
+ .post("/add")
+ .then()
+ .statusCode(202);
+
+ // get value with id
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/get/1")
+ .then()
+ .body(equalTo("val1"));
+
+ // add one value with TTL
+ request = request.withId("2")
+ .withVaLue("val2")
+ .withTtl(Long.valueOf(5), TimeUnit.MINUTES);
+ given()
+ .contentType(ContentType.JSON)
+ .body(request)
+ .when()
+ .post("/add")
+ .then()
+ .statusCode(202);
+
+ // verify that map contains key "1"
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/key/1")
+ .then()
+ .body(equalTo("true"));
+
+ // verify that map doesn't contain key "3"
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/key/3")
+ .then()
+ .body(equalTo("false"));
+
+ // verify that map contains value "val1"
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/value/val1")
+ .then()
+ .body(equalTo("true"));
+
+ // verify that map doesn't contain value "val2"
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/value/val3")
+ .then()
+ .body(equalTo("false"));
+
+ // remove value by id
+ given()
+ .when()
+ .delete("/1")
+ .then()
+ .statusCode(202);
+
+ // verify that map doesn't contain key "1" anymore
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/key/1")
+ .then()
+ .body(equalTo("false"));
+
+ // clear
+ given()
+ .when()
+ .get("/clear")
+ .then()
+ .statusCode(202);
+
+ }
+}
diff --git a/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastSetIT.java b/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastSetIT.java
new file mode 100644
index 0000000..734888c
--- /dev/null
+++ b/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastSetIT.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.hazelcast.it;
+
+import io.quarkus.test.junit.NativeImageTest;
+
+@NativeImageTest
+public class HazelcastSetIT extends HazelcastSetTest {
+}
diff --git a/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastSetTest.java b/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastSetTest.java
new file mode 100644
index 0000000..474f3c9
--- /dev/null
+++ b/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastSetTest.java
@@ -0,0 +1,129 @@
+/*
+ * 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.hazelcast.it;
+
+import java.util.Arrays;
+
+import io.quarkus.test.common.QuarkusTestResource;
+import io.quarkus.test.common.http.TestHTTPEndpoint;
+import io.quarkus.test.hazelcast.HazelcastServerTestResource;
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.http.ContentType;
+import org.junit.jupiter.api.Test;
+
+import static io.restassured.RestAssured.given;
+import static org.hamcrest.Matchers.hasItems;
+import static org.hamcrest.Matchers.hasSize;
+
+@QuarkusTest
+@TestHTTPEndpoint(HazelcastSetResource.class)
+@QuarkusTestResource(HazelcastServerTestResource.class)
+public class HazelcastSetTest {
+
+ @Test
+ public void testSet() {
+ // add one value
+ given()
+ .contentType(ContentType.JSON)
+ .body("foo1")
+ .when()
+ .put()
+ .then()
+ .statusCode(202);
+
+ // trying to add same value:: shouldn't be added twice : verify with consumer
+ given()
+ .contentType(ContentType.JSON)
+ .body("foo1")
+ .when()
+ .put()
+ .then()
+ .statusCode(202);
+
+ // remove value
+ given()
+ .contentType(ContentType.JSON)
+ .body("foo1")
+ .when()
+ .delete("/value")
+ .then()
+ .statusCode(202);
+
+ // add multiple values
+ given()
+ .contentType(ContentType.JSON)
+ .body(Arrays.asList("foo2", "foo3"))
+ .when()
+ .put("/all")
+ .then()
+ .statusCode(202);
+
+ // remove value foo2
+ given()
+ .contentType(ContentType.JSON)
+ .body("foo2")
+ .when()
+ .delete("/value")
+ .then()
+ .statusCode(202);
+
+ // delete all
+ given()
+ .contentType(ContentType.JSON)
+ .body(Arrays.asList("foo3"))
+ .when()
+ .delete("/all")
+ .then()
+ .statusCode(202);
+
+ // add multiple values
+ given()
+ .contentType(ContentType.JSON)
+ .body(Arrays.asList("foo4", "foo5", "foo6", "foo7"))
+ .when()
+ .put("/all")
+ .then()
+ .statusCode(202);
+
+ // retain only 2 : should delete foo5 and foo6
+ given()
+ .contentType(ContentType.JSON)
+ .body(Arrays.asList("foo4", "foo7"))
+ .when()
+ .post("/retain")
+ .then()
+ .statusCode(202);
+
+ // verify that the consumer has received all added values
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/added")
+ .then()
+ .body("$", hasSize(7))
+ .body("$", hasItems("foo1", "foo2", "foo3", "foo4", "foo5", "foo6", "foo7"));
+
+ // verify that the consumer has received all removed values
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get("/deleted")
+ .then()
+ .body("$", hasSize(5))
+ .body("$", hasItems("foo1", "foo2", "foo3", "foo5", "foo6"));
+ }
+}
diff --git a/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastTopicIT.java b/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastTopicIT.java
new file mode 100644
index 0000000..3de33f7
--- /dev/null
+++ b/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastTopicIT.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.hazelcast.it;
+
+import io.quarkus.test.junit.NativeImageTest;
+
+@NativeImageTest
+public class HazelcastTopicIT extends HazelcastTopicTest {
+}
diff --git a/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastTopicTest.java b/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastTopicTest.java
new file mode 100644
index 0000000..d401556
--- /dev/null
+++ b/integration-tests/hazelcast/src/test/java/org/apache/camel/quarkus/component/hazelcast/it/HazelcastTopicTest.java
@@ -0,0 +1,54 @@
+/*
+ * 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.hazelcast.it;
+
+import io.quarkus.test.common.QuarkusTestResource;
+import io.quarkus.test.common.http.TestHTTPEndpoint;
+import io.quarkus.test.hazelcast.HazelcastServerTestResource;
+import io.quarkus.test.junit.QuarkusTest;
+import io.restassured.http.ContentType;
+import org.junit.jupiter.api.Test;
+
+import static io.restassured.RestAssured.given;
+import static org.hamcrest.Matchers.hasItems;
+import static org.hamcrest.Matchers.hasSize;
+
+@QuarkusTest
+@TestHTTPEndpoint(HazelcastTopicResource.class)
+@QuarkusTestResource(HazelcastServerTestResource.class)
+public class HazelcastTopicTest {
+ @Test
+ public void testTopic() {
+ // publish topic
+ given()
+ .contentType(ContentType.JSON)
+ .body("test1")
+ .when()
+ .post()
+ .then()
+ .statusCode(202);
+
+ // verify that the consumer has received the topic
+ given()
+ .contentType(ContentType.JSON)
+ .when()
+ .get()
+ .then()
+ .body("$", hasSize(1))
+ .body("$", hasItems("test1"));
+ }
+}
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
index cb4b130..4f8f525 100644
--- a/integration-tests/pom.xml
+++ b/integration-tests/pom.xml
@@ -104,6 +104,7 @@
<module>graphql</module>
<module>grok</module>
<module>grpc</module>
+ <module>hazelcast</module>
<module>headersmap</module>
<module>http</module>
<module>hystrix</module>
diff --git a/pom.xml b/pom.xml
index 4a44ae1..037c272 100644
--- a/pom.xml
+++ b/pom.xml
@@ -63,6 +63,7 @@
<gson.version>2.8.6</gson.version><!-- JSONata -->
<hadoop2.version>${hadoop2-version}</hadoop2.version><!-- Spark -->
<hapi.version>${hapi-fhir-version}</hapi.version>
+ <hazelcast.version>4.0.3</hazelcast.version><!-- keep in sync with quarkus-hazelcast-client -->
<hbase.version>${hbase-version}</hbase.version><!-- Keep in sync with Camel -->
<htrace.version>4.2.0-incubating</htrace.version><!-- Mess in hbase transitive deps -->
<influxdb.version>${influx-java-driver-version}</influxdb.version>
@@ -87,6 +88,7 @@
<optaplanner.version>7.46.0.Final</optaplanner.version>
<quarkus.version>1.11.0.Beta1</quarkus.version>
<quarkus-google-cloud.version>0.3.0</quarkus-google-cloud.version>
+ <quarkus-hazelcast-client.version>1.1.1</quarkus-hazelcast-client.version>
<quarkus-qpid-jms.version>0.21.0</quarkus-qpid-jms.version>
<protobuf.version>${protobuf-version}</protobuf.version>
<retrofit.version>2.5.0</retrofit.version>
diff --git a/poms/bom-test/pom.xml b/poms/bom-test/pom.xml
index 5174264..fa0f073 100644
--- a/poms/bom-test/pom.xml
+++ b/poms/bom-test/pom.xml
@@ -54,6 +54,11 @@
</dependency>
<dependency>
+ <groupId>com.hazelcast</groupId>
+ <artifactId>quarkus-test-hazelcast</artifactId>
+ <version>${quarkus-hazelcast-client.version}</version>
+ </dependency>
+ <dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-integration-test-support-custom-dataformat</artifactId>
<version>${camel-quarkus.version}</version>
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index f50504a..c3ecb45 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -62,6 +62,8 @@
<scope>import</scope>
</dependency>
+
+
<!-- Dependencies a..z; do not remove this comment, it is important when sorting via mvn process-resources -Pformat -->
<!--$ org.apache.camel $-->
@@ -5462,6 +5464,21 @@
<version>${zxing.version}</version>
</dependency>
<dependency>
+ <groupId>com.hazelcast</groupId>
+ <artifactId>hazelcast</artifactId>
+ <version>${hazelcast.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.hazelcast</groupId>
+ <artifactId>quarkus-hazelcast-client</artifactId>
+ <version>${quarkus-hazelcast-client.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.hazelcast</groupId>
+ <artifactId>quarkus-hazelcast-client-deployment</artifactId>
+ <version>${quarkus-hazelcast-client.version}</version>
+ </dependency>
+ <dependency>
<groupId>com.nimbusds</groupId>
<artifactId>nimbus-jose-jwt</artifactId>
<version>${nimbus-jose-jwt.version}</version>
diff --git a/tooling/scripts/test-categories.yaml b/tooling/scripts/test-categories.yaml
index cb6fa9f..ec7fe39 100644
--- a/tooling/scripts/test-categories.yaml
+++ b/tooling/scripts/test-categories.yaml
@@ -24,6 +24,7 @@ cache-networking3:
- http
- jsch
- ssh
+ - hazelcast
cloud:
- solr
- aws