Skip to content

Commit

Permalink
Merge pull request #1374 from apache/aws2-mq
Browse files Browse the repository at this point in the history
Aws2 mq
  • Loading branch information
oscerd committed Jun 19, 2020
2 parents bdf1abe + 54744db commit 6b60b0d
Show file tree
Hide file tree
Showing 17 changed files with 111 additions and 222 deletions.
2 changes: 1 addition & 1 deletion docs/modules/ROOT/pages/extensions/aws2-mq.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
= AWS 2 MQ

[.badges]
[.badge-key]##Since Camel Quarkus##[.badge-version]##1.0.0-M6## [.badge-key]##JVM##[.badge-supported]##supported## [.badge-key]##Native##[.badge-unsupported]##unsupported##
[.badge-key]##Since Camel Quarkus##[.badge-version]##1.0.0-M6## [.badge-key]##JVM##[.badge-supported]##supported## [.badge-key]##Native##[.badge-supported]##supported##

Manage AWS MQ instances using AWS SDK version 2.x.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,7 @@ Number of Camel components: 150 in 115 JAR artifacts (0 deprecated)

| xref:extensions/aws2-kms.adoc[AWS 2 Key Management Service (KMS)] | camel-quarkus-aws2-kms | Native + Stable | 1.0.0-M6 | Manage keys stored in AWS KMS instances using AWS SDK version 2.x.

| xref:extensions/aws2-msk.adoc[AWS 2 Managed Streaming for Apache Kafka (MSK)] | camel-quarkus-aws2-msk | JVM + Preview | 1.0.0-M6 | Manage AWS MSK instances using AWS SDK version 2.x.

| xref:extensions/aws2-mq.adoc[AWS 2 MQ] | camel-quarkus-aws2-mq | JVM + Preview | 1.0.0-M6 | Manage AWS MQ instances using AWS SDK version 2.x.
| xref:extensions/aws2-mq.adoc[AWS 2 MQ] | camel-quarkus-aws2-mq | Native + Stable | 1.0.0-M6 | Manage AWS MQ instances using AWS SDK version 2.x.

| xref:extensions/aws2-s3.adoc[AWS 2 S3 Storage Service] | camel-quarkus-aws2-s3 | Native + Stable | 1.0.0-M7 | Store and retrie objects from AWS S3 Storage Service using AWS SDK version 2.x.

Expand Down

This file was deleted.

81 changes: 0 additions & 81 deletions extensions-jvm/aws2-mq/integration-test/pom.xml

This file was deleted.

This file was deleted.

This file was deleted.

1 change: 0 additions & 1 deletion extensions-jvm/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@
<modules>
<!-- extensions a..z; do not remove this comment, it is important when sorting via mvn process-resources -Pformat -->
<module>avro-rpc</module>
<module>aws2-mq</module>
<module>aws2-msk</module>
<module>aws2-ses</module>
<module>cassandraql</module>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,18 @@
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-aws2-mq</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>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-support-aws2-deployment</artifactId>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
/*
* 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.mq.deployment;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

import io.quarkus.deployment.annotations.BuildProducer;
import io.quarkus.deployment.annotations.BuildStep;
import io.quarkus.deployment.builditem.CombinedIndexBuildItem;
import io.quarkus.deployment.builditem.FeatureBuildItem;
import io.quarkus.deployment.builditem.nativeimage.NativeImageResourceBuildItem;
import io.quarkus.deployment.builditem.nativeimage.ReflectiveClassBuildItem;
import org.jboss.jandex.DotName;
import software.amazon.awssdk.core.interceptor.ExecutionInterceptor;

class Aws2MqProcessor {
private static final String FEATURE = "camel-aws2-mq";

public static final String AWS_SDK_APPLICATION_ARCHIVE_MARKERS = "software/amazon/awssdk";

private static final List<String> INTERCEPTOR_PATHS = Arrays.asList(
"software/amazon/awssdk/global/handlers/execution.interceptors");

private static final DotName EXECUTION_INTERCEPTOR_NAME = DotName.createSimple(ExecutionInterceptor.class.getName());

@BuildStep
FeatureBuildItem feature() {
return new FeatureBuildItem(FEATURE);
}

@BuildStep(applicationArchiveMarkers = { AWS_SDK_APPLICATION_ARCHIVE_MARKERS })
void process(CombinedIndexBuildItem combinedIndexBuildItem,
BuildProducer<ReflectiveClassBuildItem> reflectiveClasses,
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()));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,5 @@
<modules>
<module>deployment</module>
<module>runtime</module>
<module>integration-test</module>
</modules>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,18 @@
<groupId>org.apache.camel</groupId>
<artifactId>camel-aws2-mq</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-support-aws2</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>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
name: "Camel AWS 2 MQ"
description: "Manage AWS MQ instances using AWS SDK version 2.x"
metadata:
unlisted: true
guide: "https://camel.apache.org/camel-quarkus/latest/extensions/aws2-mq.html"
categories:
- "integration"
status: "preview"
1 change: 1 addition & 0 deletions extensions/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
<module>aws2-eks</module>
<module>aws2-iam</module>
<module>aws2-kms</module>
<module>aws2-mq</module>
<module>aws2-s3</module>
<module>aws2-sns</module>
<module>aws2-sqs</module>
Expand Down
4 changes: 4 additions & 0 deletions integration-tests/aws2/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-aws2-kms</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-aws2-mq</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.quarkus</groupId>
<artifactId>camel-quarkus-aws2-s3</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,10 @@ public void configure() {

from("timer:quarkus-kms?repeatCount=1")
.setHeader("CamelAwsKMSOperation", constant("listKeys"))
.to("aws2-kms://cluster")
.to("aws2-kms://cluster");

from("timer:quarkus-mq?repeatCount=1")
.to("aws2-mq://test?operation=listBrokers")
.to("log:sf?showAll=true");
}

Expand Down

0 comments on commit 6b60b0d

Please sign in to comment.