You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2020/04/10 16:07:50 UTC
[camel-quarkus] 01/01: Add a native extension for AWS2-SQS
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch aws2-sqs
in repository https://gitbox.apache.org/repos/asf/camel-quarkus.git
commit 863979f3b7ad8f6d4dfa51002453859438891efb
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Apr 3 17:05:27 2020 +0200
Add a native extension for AWS2-SQS
---
.github/workflows/pr-build.yaml | 1 +
.../pages/list-of-camel-quarkus-extensions.adoc | 4 +-
.../aws2/sqs/deployment/Aws2SqsProcessor.java | 47 ---------
.../component/aws2/sqs/it/Aws2SqsResource.java | 51 ----------
extensions-jvm/pom.xml | 1 -
.../aws2-sqs/deployment/pom.xml | 8 ++
.../aws2/sqs/deployment/Aws2SqsProcessor.java | 110 +++++++++++++++++++++
{extensions-jvm => extensions}/aws2-sqs/pom.xml | 1 -
.../aws2-sqs/runtime/pom.xml | 8 ++
.../main/resources/META-INF/quarkus-extension.yaml | 7 +-
.../aws2}/pom.xml | 66 +++++++++++--
.../camel/quarkus/component/aws/CamelRoute.java | 24 ++---
.../aws2/src/main/resources/application.properties | 33 +++++++
integration-tests/pom.xml | 1 +
pom.xml | 2 +-
poms/bom/pom.xml | 11 +++
16 files changed, 248 insertions(+), 127 deletions(-)
diff --git a/.github/workflows/pr-build.yaml b/.github/workflows/pr-build.yaml
index 6b6e52e..f337c2a 100644
--- a/.github/workflows/pr-build.yaml
+++ b/.github/workflows/pr-build.yaml
@@ -115,6 +115,7 @@ jobs:
- category: Cloud
test-modules: >
aws
+ aws2
azure
consul
- category: Core
diff --git a/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc b/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
index 1d86eb5..5618de2 100644
--- a/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
+++ b/docs/modules/ROOT/pages/list-of-camel-quarkus-extensions.adoc
@@ -94,8 +94,8 @@ Level | Since | Description
Preview | 1.0.0-M6 | The aws2-sns component is used for sending messages to an Amazon Simple Notification Topic.
| link:https://camel.apache.org/components/latest/aws2-sqs-component.html[AWS 2 Simple Queue Service] (camel-quarkus-aws2-sqs) +
-`aws2-sqs:queueNameOrArn` | JVM +
- Preview | 1.0.0-M6 | The aws2-sqs component is used for sending and receiving messages to Amazon's SQS service.
+`aws2-sqs:queueNameOrArn` | Native +
+ Stable | 1.0.0-M6 | The aws2-sqs component is used for sending and receiving messages to Amazon's SQS service.
| link:https://camel.apache.org/components/latest/aws2-translate-component.html[AWS 2 Translate] (camel-quarkus-aws2-translate) +
`aws2-translate:label` | JVM +
diff --git a/extensions-jvm/aws2-sqs/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/sqs/deployment/Aws2SqsProcessor.java b/extensions-jvm/aws2-sqs/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/sqs/deployment/Aws2SqsProcessor.java
deleted file mode 100644
index 5d19de2..0000000
--- a/extensions-jvm/aws2-sqs/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/sqs/deployment/Aws2SqsProcessor.java
+++ /dev/null
@@ -1,47 +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.aws2.sqs.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 Aws2SqsProcessor {
- private static final Logger LOG = Logger.getLogger(Aws2SqsProcessor.class);
-
- private static final String FEATURE = "camel-aws2-sqs";
-
- @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/aws2-sqs/integration-test/src/main/java/org/apache/camel/quarkus/component/aws2/sqs/it/Aws2SqsResource.java b/extensions-jvm/aws2-sqs/integration-test/src/main/java/org/apache/camel/quarkus/component/aws2/sqs/it/Aws2SqsResource.java
deleted file mode 100644
index bc79e58..0000000
--- a/extensions-jvm/aws2-sqs/integration-test/src/main/java/org/apache/camel/quarkus/component/aws2/sqs/it/Aws2SqsResource.java
+++ /dev/null
@@ -1,51 +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.aws2.sqs.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("/aws2-sqs")
-@ApplicationScoped
-public class Aws2SqsResource {
-
- private static final Logger LOG = Logger.getLogger(Aws2SqsResource.class);
-
- private static final String COMPONENT_AWS2_SQS = "aws2-sqs";
- @Inject
- CamelContext context;
-
- @Path("/load/component/aws2-sqs")
- @GET
- @Produces(MediaType.TEXT_PLAIN)
- public Response loadComponentAws2Sqs() throws Exception {
- /* This is an autogenerated test */
- if (context.getComponent(COMPONENT_AWS2_SQS) != null) {
- return Response.ok().build();
- }
- LOG.warnf("Could not load [%s] from the Camel context", COMPONENT_AWS2_SQS);
- return Response.status(500, COMPONENT_AWS2_SQS + " could not be loaded from the Camel context").build();
- }
-}
diff --git a/extensions-jvm/pom.xml b/extensions-jvm/pom.xml
index 665b383..d014b84 100644
--- a/extensions-jvm/pom.xml
+++ b/extensions-jvm/pom.xml
@@ -47,7 +47,6 @@
<module>aws2-msk</module>
<module>aws2-ses</module>
<module>aws2-sns</module>
- <module>aws2-sqs</module>
<module>aws2-translate</module>
<module>cassandraql</module>
<module>couchbase</module>
diff --git a/extensions-jvm/aws2-sqs/deployment/pom.xml b/extensions/aws2-sqs/deployment/pom.xml
similarity index 89%
rename from extensions-jvm/aws2-sqs/deployment/pom.xml
rename to extensions/aws2-sqs/deployment/pom.xml
index 7f7487b..d2b0165 100644
--- a/extensions-jvm/aws2-sqs/deployment/pom.xml
+++ b/extensions/aws2-sqs/deployment/pom.xml
@@ -50,6 +50,14 @@
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-aws2-sqs</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-support-xml-deployment</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-support-commons-logging-deployment</artifactId>
+ </dependency>
</dependencies>
<build>
diff --git a/extensions/aws2-sqs/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/sqs/deployment/Aws2SqsProcessor.java b/extensions/aws2-sqs/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/sqs/deployment/Aws2SqsProcessor.java
new file mode 100644
index 0000000..9231d9c
--- /dev/null
+++ b/extensions/aws2-sqs/deployment/src/main/java/org/apache/camel/quarkus/component/aws2/sqs/deployment/Aws2SqsProcessor.java
@@ -0,0 +1,110 @@
+/*
+ * 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.aws2.sqs.deployment;
+
+import java.util.Arrays;
+import java.util.List;
+import java.util.stream.Collectors;
+
+import javax.enterprise.inject.spi.DeploymentException;
+
+import io.quarkus.arc.deployment.AdditionalBeanBuildItem;
+import io.quarkus.arc.deployment.BeanRegistrationPhaseBuildItem;
+import io.quarkus.deployment.annotations.BuildProducer;
+import io.quarkus.deployment.annotations.BuildStep;
+import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
+import io.quarkus.deployment.builditem.ExtensionSslNativeSupportBuildItem;
+import io.quarkus.deployment.builditem.FeatureBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.NativeImageProxyDefinitionBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
+import io.quarkus.deployment.builditem.nativeimage.ServiceProviderBuildItem;
+import org.jboss.jandex.DotName;
+import software.amazon.awssdk.core.interceptor.ExecutionInterceptor;
+import software.amazon.awssdk.http.SdkHttpService;
+
+class Aws2SqsProcessor {
+ private static final String FEATURE = "camel-aws2-sqs";
+
+ public static final String AWS_SDK_APPLICATION_ARCHIVE_MARKERS = "software/amazon/awssdk";
+
+ private static final String APACHE_HTTP_SERVICE = "software.amazon.awssdk.http.apache.ApacheSdkHttpService";
+
+ private static final List<String> INTERCEPTOR_PATHS = Arrays.asList(
+ "software/amazon/awssdk/global/handlers/execution.interceptors",
+ "software/amazon/awssdk/services/sqs/execution.interceptors");
+
+ private static final DotName EXECUTION_INTERCEPTOR_NAME = DotName.createSimple(ExecutionInterceptor.class.getName());
+
+ @BuildStep
+ FeatureBuildItem feature() {
+ return new FeatureBuildItem(FEATURE);
+ }
+
+ @BuildStep
+ ExtensionSslNativeSupportBuildItem activateSslNativeSupport() {
+ return new ExtensionSslNativeSupportBuildItem(FEATURE);
+ }
+
+ @BuildStep(applicationArchiveMarkers = { AWS_SDK_APPLICATION_ARCHIVE_MARKERS })
+ void process(CombinedIndexBuildItem combinedIndexBuildItem,
+ BuildProducer<ExtensionSslNativeSupportBuildItem> extensionSslNativeSupport,
+ BuildProducer<ReflectiveClassBuildItem> reflectiveClasses,
+ BuildProducer<FeatureBuildItem> feature,
+ BuildProducer<AdditionalBeanBuildItem> additionalBeans,
+ BuildProducer<NativeImageResourceBuildItem> resource) {
+
+ INTERCEPTOR_PATHS.forEach(path -> resource.produce(new NativeImageResourceBuildItem(path)));
+
+ List<String> knownInterceptorImpls = combinedIndexBuildItem.getIndex()
+ .getAllKnownImplementors(EXECUTION_INTERCEPTOR_NAME)
+ .stream()
+ .map(c -> c.name().toString()).collect(Collectors.toList());
+
+ reflectiveClasses.produce(new ReflectiveClassBuildItem(false, false,
+ knownInterceptorImpls.toArray(new String[knownInterceptorImpls.size()])));
+
+ reflectiveClasses.produce(new ReflectiveClassBuildItem(true, false,
+ String.class.getCanonicalName()));
+ }
+
+ @BuildStep(loadsApplicationClasses = true)
+ void client(BeanRegistrationPhaseBuildItem beanRegistrationPhase,
+ BuildProducer<ServiceProviderBuildItem> serviceProvider,
+ BuildProducer<NativeImageProxyDefinitionBuildItem> proxyDefinition) {
+ checkClasspath(APACHE_HTTP_SERVICE, "apache-client");
+
+ //Register Apache client as sync client
+ proxyDefinition.produce(
+ new NativeImageProxyDefinitionBuildItem("org.apache.http.conn.HttpClientConnectionManager",
+ "org.apache.http.pool.ConnPoolControl",
+ "software.amazon.awssdk.http.apache.internal.conn.Wrapped"));
+
+ serviceProvider.produce(new ServiceProviderBuildItem(SdkHttpService.class.getName(), APACHE_HTTP_SERVICE));
+
+ }
+
+ private void checkClasspath(String className, String dependencyName) {
+ try {
+ Class.forName(className, true, Thread.currentThread().getContextClassLoader());
+ } catch (ClassNotFoundException e) {
+ throw new DeploymentException(
+ "Missing 'software.amazon.awssdk:" + dependencyName + "' dependency on the classpath");
+ }
+ }
+
+}
diff --git a/extensions-jvm/aws2-sqs/pom.xml b/extensions/aws2-sqs/pom.xml
similarity index 97%
rename from extensions-jvm/aws2-sqs/pom.xml
rename to extensions/aws2-sqs/pom.xml
index bce132e..0cce6e5 100644
--- a/extensions-jvm/aws2-sqs/pom.xml
+++ b/extensions/aws2-sqs/pom.xml
@@ -33,6 +33,5 @@
<modules>
<module>deployment</module>
<module>runtime</module>
- <module>integration-test</module>
</modules>
</project>
diff --git a/extensions-jvm/aws2-sqs/runtime/pom.xml b/extensions/aws2-sqs/runtime/pom.xml
similarity index 90%
rename from extensions-jvm/aws2-sqs/runtime/pom.xml
rename to extensions/aws2-sqs/runtime/pom.xml
index 24b689e..3dcfc7a 100644
--- a/extensions-jvm/aws2-sqs/runtime/pom.xml
+++ b/extensions/aws2-sqs/runtime/pom.xml
@@ -55,6 +55,14 @@
<groupId>org.apache.camel</groupId>
<artifactId>camel-aws2-sqs</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-support-xml</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-support-commons-logging</artifactId>
+ </dependency>
</dependencies>
<build>
diff --git a/extensions-jvm/aws2-sqs/runtime/src/main/resources/META-INF/quarkus-extension.yaml b/extensions/aws2-sqs/runtime/src/main/resources/META-INF/quarkus-extension.yaml
similarity index 88%
rename from extensions-jvm/aws2-sqs/runtime/src/main/resources/META-INF/quarkus-extension.yaml
rename to extensions/aws2-sqs/runtime/src/main/resources/META-INF/quarkus-extension.yaml
index 27f44d8..a9a426a 100644
--- a/extensions-jvm/aws2-sqs/runtime/src/main/resources/META-INF/quarkus-extension.yaml
+++ b/extensions/aws2-sqs/runtime/src/main/resources/META-INF/quarkus-extension.yaml
@@ -19,11 +19,10 @@
name: "AWS 2 Simple Queue Service"
description: "The aws2-sqs component is used for sending and receiving messages to Amazon's SQS service."
metadata:
- unlisted: true
keywords:
+ - "camel"
+ - "aws"
- "cloud"
- - "messaging"
- guide: "https://camel.apache.org/components/latest/aws2-sqs-component.html"
+ guide: "https://quarkus.io/guides/camel"
categories:
- "integration"
- status: "preview"
diff --git a/extensions-jvm/aws2-sqs/integration-test/pom.xml b/integration-tests/aws2/pom.xml
similarity index 59%
rename from extensions-jvm/aws2-sqs/integration-test/pom.xml
rename to integration-tests/aws2/pom.xml
index 4d73923..1ac1e06 100644
--- a/extensions-jvm/aws2-sqs/integration-test/pom.xml
+++ b/integration-tests/aws2/pom.xml
@@ -18,16 +18,16 @@
-->
<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-aws2-sqs-parent</artifactId>
+ <artifactId>camel-quarkus-integration-tests</artifactId>
<version>1.1.0-SNAPSHOT</version>
</parent>
+ <modelVersion>4.0.0</modelVersion>
- <artifactId>camel-quarkus-aws2-sqs-integration-test</artifactId>
- <name>Camel Quarkus :: AWS 2 Simple Queue Service :: Integration Test</name>
- <description>Integration tests for Camel Quarkus AWS 2 Simple Queue Service extension</description>
+ <artifactId>camel-quarkus-integration-test-aws2</artifactId>
+ <name>Camel Quarkus :: Integration Tests :: AWS2</name>
+ <description>The camel integration tests</description>
<properties>
<!-- mvnd, a.k.a. Maven Daemon: https://github.com/gnodet/mvnd -->
@@ -36,18 +36,35 @@
<!-- explicit dependencies of this module in the Maven sense, although they are required by the Quarkus Maven plugin. -->
<!-- Please update rule whenever you change the dependencies of this module by running -->
<!-- mvn process-resources -Pformat from the root directory -->
- <mvnd.builder.rule>camel-quarkus-aws2-sqs-deployment,camel-quarkus-support-policy-deployment</mvnd.builder.rule>
+ <mvnd.builder.rule>camel-quarkus-aws2-sqs-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-aws2-sqs</artifactId>
</dependency>
<dependency>
- <groupId>io.quarkus</groupId>
- <artifactId>quarkus-resteasy</artifactId>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-log</artifactId>
</dependency>
+ <dependency>
+ <groupId>org.apache.camel.quarkus</groupId>
+ <artifactId>camel-quarkus-timer</artifactId>
+ </dependency>
+
<!-- test dependencies -->
<dependency>
@@ -55,11 +72,13 @@
<artifactId>quarkus-junit5</artifactId>
<scope>test</scope>
</dependency>
+ <!--
<dependency>
<groupId>io.rest-assured</groupId>
<artifactId>rest-assured</artifactId>
<scope>test</scope>
</dependency>
+ -->
</dependencies>
<build>
@@ -77,4 +96,35 @@
</plugin>
</plugins>
</build>
+
+ <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/extensions-jvm/aws2-sqs/integration-test/src/test/java/org/apache/camel/quarkus/component/aws2/sqs/it/Aws2SqsTest.java b/integration-tests/aws2/src/main/java/org/apache/camel/quarkus/component/aws/CamelRoute.java
similarity index 63%
rename from extensions-jvm/aws2-sqs/integration-test/src/test/java/org/apache/camel/quarkus/component/aws2/sqs/it/Aws2SqsTest.java
rename to integration-tests/aws2/src/main/java/org/apache/camel/quarkus/component/aws/CamelRoute.java
index 17ad46e..04c1541 100644
--- a/extensions-jvm/aws2-sqs/integration-test/src/test/java/org/apache/camel/quarkus/component/aws2/sqs/it/Aws2SqsTest.java
+++ b/integration-tests/aws2/src/main/java/org/apache/camel/quarkus/component/aws/CamelRoute.java
@@ -14,21 +14,21 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-package org.apache.camel.quarkus.component.aws2.sqs.it;
+package org.apache.camel.quarkus.component.aws;
-import io.quarkus.test.junit.QuarkusTest;
-import io.restassured.RestAssured;
-import org.junit.jupiter.api.Test;
+import io.quarkus.runtime.annotations.RegisterForReflection;
+import org.apache.camel.builder.RouteBuilder;
-@QuarkusTest
-class Aws2SqsTest {
+@RegisterForReflection
+public class CamelRoute extends RouteBuilder {
- @Test
- public void loadComponentAws2Sqs() {
- /* A simple autogenerated test */
- RestAssured.get("/aws2-sqs/load/component/aws2-sqs")
- .then()
- .statusCode(200);
+ @Override
+ public void configure() {
+
+ from("timer:quarkus-sqs?repeatCount=1")
+ .setBody(constant("Quarkus is great!"))
+ .to("aws2-sqs://camel-1?delaySeconds=5")
+ .to("log:sf?showAll=true");
}
}
diff --git a/integration-tests/aws2/src/main/resources/application.properties b/integration-tests/aws2/src/main/resources/application.properties
new file mode 100644
index 0000000..3a45551
--- /dev/null
+++ b/integration-tests/aws2/src/main/resources/application.properties
@@ -0,0 +1,33 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+#
+# Quarkus
+#
+quarkus.ssl.native=true
+quarkus.log.file.enable = false
+
+#
+# Camel
+#
+camel.context.name = quarkus-camel-example
+
+#
+# Camel :: AWS SQS
+#
+camel.component.aws2-sqs.access-key={{env:AWS_ACCESS_KEY}}
+camel.component.aws2-sqs.secret-key={{env:AWS_SECRET_KEY}}
+camel.component.aws2-sqs.region={{env:AWS_REGION}}
\ No newline at end of file
diff --git a/integration-tests/pom.xml b/integration-tests/pom.xml
index a70dc29..5e32424 100644
--- a/integration-tests/pom.xml
+++ b/integration-tests/pom.xml
@@ -58,6 +58,7 @@
<module>activemq</module>
<module>amqp</module>
<module>aws</module>
+ <module>aws2</module>
<module>azure</module>
<module>base64</module>
<module>bean</module>
diff --git a/pom.xml b/pom.xml
index f9da850..6b1c306 100644
--- a/pom.xml
+++ b/pom.xml
@@ -44,7 +44,7 @@
<ahc.version>2.10.4</ahc.version>
<awssdk1.version>1.11.714</awssdk1.version>
<awssdk1-swf-libs.version>1.11.22</awssdk1-swf-libs.version>
- <awssdk2.version>2.10.67</awssdk2.version>
+ <awssdk2.version>2.11.5</awssdk2.version>
<camel.version>3.2.0</camel.version>
<freemarker.version>2.3.30</freemarker.version>
<google-http-client.version>1.22.0</google-http-client.version>
diff --git a/poms/bom/pom.xml b/poms/bom/pom.xml
index 03934c0..cd7cbf6 100644
--- a/poms/bom/pom.xml
+++ b/poms/bom/pom.xml
@@ -261,6 +261,12 @@
<groupId>org.apache.camel</groupId>
<artifactId>camel-aws2-sqs</artifactId>
<version>${camel.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>software.amazon.awssdk</groupId>
+ <artifactId>netty-nio-client</artifactId>
+ </exclusion>
+ </exclusions>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
@@ -2115,6 +2121,11 @@
<version>${awssdk2.version}</version><!-- override the version set in the quarkus BOM -->
</dependency>
<dependency>
+ <groupId>software.amazon.awssdk</groupId>
+ <artifactId>regions</artifactId>
+ <version>${awssdk2.version}</version><!-- override the version set in the quarkus BOM -->
+ </dependency>
+ <dependency>
<groupId>xalan</groupId>
<artifactId>xalan</artifactId>
<version>${xalan.version}</version>