You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by GitBox <gi...@apache.org> on 2021/09/28 14:15:16 UTC

[GitHub] [camel-quarkus] jamesnetherton opened a new pull request #3133: Test Quarkus DynamoDB extension with Camel Quarkus AWS 2 DDB

jamesnetherton opened a new pull request #3133:
URL: https://github.com/apache/camel-quarkus/pull/3133


   This reworks #3114 with the following changes:
   
   * Created a new test grouping for testing Camel AWS extensions with their associated Quarkus AWS extensions
   * Simplified the configuration docs
   * Dropped the limitations notice about the 'batch consumer' feature not being supported. I've removed the reference to it from the Camel component docs instead
   * Fixed some compilation warnings
   
   Most of the test code is duplicated from the original ddb test, but we could look to have more DRY in future.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] aldettinger commented on a change in pull request #3133: Test Quarkus DynamoDB extension with Camel Quarkus AWS 2 DDB

Posted by GitBox <gi...@apache.org>.
aldettinger commented on a change in pull request #3133:
URL: https://github.com/apache/camel-quarkus/pull/3133#discussion_r717693717



##########
File path: docs/modules/ROOT/pages/reference/extensions/aws2-ddb.adoc
##########
@@ -45,3 +45,28 @@ Check the xref:user-guide/index.adoc[User guide] for more information about writ
 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
+
+=== Optional integration with Quarkus Amazon DynamoDB
+
+If desired, it is possible to use the Quarkus Amazon DynamoDB Client extension in conjunction with Camel Quarkus AWA2 DDB.

Review comment:
       small typos: AWA2

##########
File path: docs/modules/ROOT/pages/reference/extensions/aws2-ddb.adoc
##########
@@ -45,3 +45,28 @@ Check the xref:user-guide/index.adoc[User guide] for more information about writ
 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
+
+=== Optional integration with Quarkus Amazon DynamoDB
+
+If desired, it is possible to use the Quarkus Amazon DynamoDB Client extension in conjunction with Camel Quarkus AWA2 DDB.
+Note that this optional and not at all mandatory.

Review comment:
       Godo to explicit that. Maybe the formulation: Note that this is totally optional.

##########
File path: integration-test-groups/aws2-quarkus-client/aws2-ddb/src/main/java/org/apache/camel/quarkus/component/aws2/ddb/it/Aws2DdbResource.java
##########
@@ -0,0 +1,321 @@
+/*
+ * 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.ddb.it;
+
+import java.net.URI;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.Consumes;
+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.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.Message;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.component.aws2.ddb.Ddb2Constants;
+import org.apache.camel.component.aws2.ddb.Ddb2Endpoint;
+import org.apache.camel.component.aws2.ddb.Ddb2Operations;
+import org.apache.camel.util.CollectionHelper;
+import org.eclipse.microprofile.config.inject.ConfigProperty;
+import software.amazon.awssdk.services.dynamodb.DynamoDbClient;
+import software.amazon.awssdk.services.dynamodb.model.AttributeAction;
+import software.amazon.awssdk.services.dynamodb.model.AttributeValue;
+import software.amazon.awssdk.services.dynamodb.model.AttributeValueUpdate;
+import software.amazon.awssdk.services.dynamodb.model.ComparisonOperator;
+import software.amazon.awssdk.services.dynamodb.model.Condition;
+import software.amazon.awssdk.services.dynamodb.model.KeysAndAttributes;
+import software.amazon.awssdk.services.dynamodb.model.ProvisionedThroughputDescription;
+
+@Path("/aws2-ddb")
+@ApplicationScoped
+public class Aws2DdbResource {
+
+    public enum Table {
+        basic, operations, stream
+    }
+
+    @ConfigProperty(name = "aws-ddb.table-name")
+    String tableName;
+
+    @ConfigProperty(name = "aws-ddb.operations-table-name")
+    String operationsTableName;
+
+    @ConfigProperty(name = "aws-ddb.stream-table-name")
+    String streamTableName;
+
+    @Inject
+    ProducerTemplate producerTemplate;
+
+    @Inject
+    CamelContext context;
+
+    @Inject
+    DynamoDbClient dynamoDB;
+
+    @SuppressWarnings("serial")
+    @Path("/item/{key}")
+    @POST
+    @Consumes(MediaType.TEXT_PLAIN)
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response post(String message,

Review comment:
       Maybe method named createItem(...) ?

##########
File path: integration-test-groups/aws2-quarkus-client/aws2-ddb/src/main/java/org/apache/camel/quarkus/component/aws2/ddb/it/Aws2DdbResource.java
##########
@@ -0,0 +1,321 @@
+/*
+ * 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.ddb.it;
+
+import java.net.URI;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.Consumes;
+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.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.Message;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.component.aws2.ddb.Ddb2Constants;
+import org.apache.camel.component.aws2.ddb.Ddb2Endpoint;
+import org.apache.camel.component.aws2.ddb.Ddb2Operations;
+import org.apache.camel.util.CollectionHelper;
+import org.eclipse.microprofile.config.inject.ConfigProperty;
+import software.amazon.awssdk.services.dynamodb.DynamoDbClient;
+import software.amazon.awssdk.services.dynamodb.model.AttributeAction;
+import software.amazon.awssdk.services.dynamodb.model.AttributeValue;
+import software.amazon.awssdk.services.dynamodb.model.AttributeValueUpdate;
+import software.amazon.awssdk.services.dynamodb.model.ComparisonOperator;
+import software.amazon.awssdk.services.dynamodb.model.Condition;
+import software.amazon.awssdk.services.dynamodb.model.KeysAndAttributes;
+import software.amazon.awssdk.services.dynamodb.model.ProvisionedThroughputDescription;
+
+@Path("/aws2-ddb")
+@ApplicationScoped
+public class Aws2DdbResource {
+
+    public enum Table {
+        basic, operations, stream
+    }
+
+    @ConfigProperty(name = "aws-ddb.table-name")
+    String tableName;
+
+    @ConfigProperty(name = "aws-ddb.operations-table-name")
+    String operationsTableName;
+
+    @ConfigProperty(name = "aws-ddb.stream-table-name")
+    String streamTableName;
+
+    @Inject
+    ProducerTemplate producerTemplate;
+
+    @Inject
+    CamelContext context;
+
+    @Inject
+    DynamoDbClient dynamoDB;
+
+    @SuppressWarnings("serial")
+    @Path("/item/{key}")
+    @POST
+    @Consumes(MediaType.TEXT_PLAIN)
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response post(String message,

Review comment:
       Maybe method named createItem(...) ? putItem ?

##########
File path: integration-tests/aws2-quarkus-client-grouped/README.adoc
##########
@@ -0,0 +1,8 @@
+== Camel Quarkus AWS 2 With Quarkus AW2 Client extensions grouped integration tests
+
+This module allows executing all tests from `integration-test-groups/aws2-quarkus-client/*` grouped together.
+See the https://camel.apache.org/camel-quarkus/latest/contributor-guide/extension-testing.html#_grouping[Grouping section] of the Contributor guide for more details.
+
+=== Mock backend vs. real service
+
+Please refer to link:../../integration-test-groups/aws2-quarkus-client/README.adoc[integration-test-groups/aws2-quarkus-client/README.adoc] for more details.

Review comment:
       It's been a hard days night :) but don't we miss a .. in the link ?

##########
File path: docs/modules/ROOT/pages/reference/extensions/aws2-ddb.adoc
##########
@@ -45,3 +45,28 @@ Check the xref:user-guide/index.adoc[User guide] for more information about writ
 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
+
+=== Optional integration with Quarkus Amazon DynamoDB
+
+If desired, it is possible to use the Quarkus Amazon DynamoDB Client extension in conjunction with Camel Quarkus AWA2 DDB.
+Note that this optional and not at all mandatory.

Review comment:
       I felt it like a repetition, but there is no big requirement to change.

##########
File path: integration-tests/aws2-quarkus-client-grouped/README.adoc
##########
@@ -0,0 +1,8 @@
+== Camel Quarkus AWS 2 With Quarkus AW2 Client extensions grouped integration tests
+
+This module allows executing all tests from `integration-test-groups/aws2-quarkus-client/*` grouped together.
+See the https://camel.apache.org/camel-quarkus/latest/contributor-guide/extension-testing.html#_grouping[Grouping section] of the Contributor guide for more details.
+
+=== Mock backend vs. real service
+
+Please refer to link:../../integration-test-groups/aws2-quarkus-client/README.adoc[integration-test-groups/aws2-quarkus-client/README.adoc] for more details.

Review comment:
       So confirmation (hard day's night :)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] jamesnetherton commented on a change in pull request #3133: Test Quarkus DynamoDB extension with Camel Quarkus AWS 2 DDB

Posted by GitBox <gi...@apache.org>.
jamesnetherton commented on a change in pull request #3133:
URL: https://github.com/apache/camel-quarkus/pull/3133#discussion_r717721797



##########
File path: docs/modules/ROOT/pages/reference/extensions/aws2-ddb.adoc
##########
@@ -45,3 +45,28 @@ Check the xref:user-guide/index.adoc[User guide] for more information about writ
 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
+
+=== Optional integration with Quarkus Amazon DynamoDB
+
+If desired, it is possible to use the Quarkus Amazon DynamoDB Client extension in conjunction with Camel Quarkus AWA2 DDB.
+Note that this optional and not at all mandatory.

Review comment:
       To my mind `"totally optional" == "optional and not at all mandatory"`.
   
   Happy to change it if necessary though.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] aldettinger commented on a change in pull request #3133: Test Quarkus DynamoDB extension with Camel Quarkus AWS 2 DDB

Posted by GitBox <gi...@apache.org>.
aldettinger commented on a change in pull request #3133:
URL: https://github.com/apache/camel-quarkus/pull/3133#discussion_r717815293



##########
File path: integration-tests/aws2-quarkus-client-grouped/README.adoc
##########
@@ -0,0 +1,8 @@
+== Camel Quarkus AWS 2 With Quarkus AW2 Client extensions grouped integration tests
+
+This module allows executing all tests from `integration-test-groups/aws2-quarkus-client/*` grouped together.
+See the https://camel.apache.org/camel-quarkus/latest/contributor-guide/extension-testing.html#_grouping[Grouping section] of the Contributor guide for more details.
+
+=== Mock backend vs. real service
+
+Please refer to link:../../integration-test-groups/aws2-quarkus-client/README.adoc[integration-test-groups/aws2-quarkus-client/README.adoc] for more details.

Review comment:
       So confirmation (hard day's night :)




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] aldettinger commented on a change in pull request #3133: Test Quarkus DynamoDB extension with Camel Quarkus AWS 2 DDB

Posted by GitBox <gi...@apache.org>.
aldettinger commented on a change in pull request #3133:
URL: https://github.com/apache/camel-quarkus/pull/3133#discussion_r717693717



##########
File path: docs/modules/ROOT/pages/reference/extensions/aws2-ddb.adoc
##########
@@ -45,3 +45,28 @@ Check the xref:user-guide/index.adoc[User guide] for more information about writ
 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
+
+=== Optional integration with Quarkus Amazon DynamoDB
+
+If desired, it is possible to use the Quarkus Amazon DynamoDB Client extension in conjunction with Camel Quarkus AWA2 DDB.

Review comment:
       small typos: AWA2




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] jamesnetherton commented on a change in pull request #3133: Test Quarkus DynamoDB extension with Camel Quarkus AWS 2 DDB

Posted by GitBox <gi...@apache.org>.
jamesnetherton commented on a change in pull request #3133:
URL: https://github.com/apache/camel-quarkus/pull/3133#discussion_r717719702



##########
File path: docs/modules/ROOT/pages/reference/extensions/aws2-ddb.adoc
##########
@@ -45,3 +45,28 @@ Check the xref:user-guide/index.adoc[User guide] for more information about writ
 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
+
+=== Optional integration with Quarkus Amazon DynamoDB
+
+If desired, it is possible to use the Quarkus Amazon DynamoDB Client extension in conjunction with Camel Quarkus AWA2 DDB.

Review comment:
       Thanks for catching it. I'll fix.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] aldettinger commented on a change in pull request #3133: Test Quarkus DynamoDB extension with Camel Quarkus AWS 2 DDB

Posted by GitBox <gi...@apache.org>.
aldettinger commented on a change in pull request #3133:
URL: https://github.com/apache/camel-quarkus/pull/3133#discussion_r717694625



##########
File path: docs/modules/ROOT/pages/reference/extensions/aws2-ddb.adoc
##########
@@ -45,3 +45,28 @@ Check the xref:user-guide/index.adoc[User guide] for more information about writ
 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
+
+=== Optional integration with Quarkus Amazon DynamoDB
+
+If desired, it is possible to use the Quarkus Amazon DynamoDB Client extension in conjunction with Camel Quarkus AWA2 DDB.
+Note that this optional and not at all mandatory.

Review comment:
       Godo to explicit that. Maybe the formulation: Note that this is totally optional.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] aldettinger commented on a change in pull request #3133: Test Quarkus DynamoDB extension with Camel Quarkus AWS 2 DDB

Posted by GitBox <gi...@apache.org>.
aldettinger commented on a change in pull request #3133:
URL: https://github.com/apache/camel-quarkus/pull/3133#discussion_r717701946



##########
File path: integration-test-groups/aws2-quarkus-client/aws2-ddb/src/main/java/org/apache/camel/quarkus/component/aws2/ddb/it/Aws2DdbResource.java
##########
@@ -0,0 +1,321 @@
+/*
+ * 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.ddb.it;
+
+import java.net.URI;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.Consumes;
+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.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.Message;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.component.aws2.ddb.Ddb2Constants;
+import org.apache.camel.component.aws2.ddb.Ddb2Endpoint;
+import org.apache.camel.component.aws2.ddb.Ddb2Operations;
+import org.apache.camel.util.CollectionHelper;
+import org.eclipse.microprofile.config.inject.ConfigProperty;
+import software.amazon.awssdk.services.dynamodb.DynamoDbClient;
+import software.amazon.awssdk.services.dynamodb.model.AttributeAction;
+import software.amazon.awssdk.services.dynamodb.model.AttributeValue;
+import software.amazon.awssdk.services.dynamodb.model.AttributeValueUpdate;
+import software.amazon.awssdk.services.dynamodb.model.ComparisonOperator;
+import software.amazon.awssdk.services.dynamodb.model.Condition;
+import software.amazon.awssdk.services.dynamodb.model.KeysAndAttributes;
+import software.amazon.awssdk.services.dynamodb.model.ProvisionedThroughputDescription;
+
+@Path("/aws2-ddb")
+@ApplicationScoped
+public class Aws2DdbResource {
+
+    public enum Table {
+        basic, operations, stream
+    }
+
+    @ConfigProperty(name = "aws-ddb.table-name")
+    String tableName;
+
+    @ConfigProperty(name = "aws-ddb.operations-table-name")
+    String operationsTableName;
+
+    @ConfigProperty(name = "aws-ddb.stream-table-name")
+    String streamTableName;
+
+    @Inject
+    ProducerTemplate producerTemplate;
+
+    @Inject
+    CamelContext context;
+
+    @Inject
+    DynamoDbClient dynamoDB;
+
+    @SuppressWarnings("serial")
+    @Path("/item/{key}")
+    @POST
+    @Consumes(MediaType.TEXT_PLAIN)
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response post(String message,

Review comment:
       Maybe method named createItem(...) ?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] aldettinger commented on a change in pull request #3133: Test Quarkus DynamoDB extension with Camel Quarkus AWS 2 DDB

Posted by GitBox <gi...@apache.org>.
aldettinger commented on a change in pull request #3133:
URL: https://github.com/apache/camel-quarkus/pull/3133#discussion_r717721341



##########
File path: integration-tests/aws2-quarkus-client-grouped/README.adoc
##########
@@ -0,0 +1,8 @@
+== Camel Quarkus AWS 2 With Quarkus AW2 Client extensions grouped integration tests
+
+This module allows executing all tests from `integration-test-groups/aws2-quarkus-client/*` grouped together.
+See the https://camel.apache.org/camel-quarkus/latest/contributor-guide/extension-testing.html#_grouping[Grouping section] of the Contributor guide for more details.
+
+=== Mock backend vs. real service
+
+Please refer to link:../../integration-test-groups/aws2-quarkus-client/README.adoc[integration-test-groups/aws2-quarkus-client/README.adoc] for more details.

Review comment:
       It's been a hard days night :) but don't we miss a .. in the link ?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] ppalaga merged pull request #3133: Test Quarkus DynamoDB extension with Camel Quarkus AWS 2 DDB

Posted by GitBox <gi...@apache.org>.
ppalaga merged pull request #3133:
URL: https://github.com/apache/camel-quarkus/pull/3133


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] jamesnetherton commented on a change in pull request #3133: Test Quarkus DynamoDB extension with Camel Quarkus AWS 2 DDB

Posted by GitBox <gi...@apache.org>.
jamesnetherton commented on a change in pull request #3133:
URL: https://github.com/apache/camel-quarkus/pull/3133#discussion_r717719702



##########
File path: docs/modules/ROOT/pages/reference/extensions/aws2-ddb.adoc
##########
@@ -45,3 +45,28 @@ Check the xref:user-guide/index.adoc[User guide] for more information about writ
 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
+
+=== Optional integration with Quarkus Amazon DynamoDB
+
+If desired, it is possible to use the Quarkus Amazon DynamoDB Client extension in conjunction with Camel Quarkus AWA2 DDB.

Review comment:
       Thanks for catching it. I'll fix.

##########
File path: docs/modules/ROOT/pages/reference/extensions/aws2-ddb.adoc
##########
@@ -45,3 +45,28 @@ Check the xref:user-guide/index.adoc[User guide] for more information about writ
 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
+
+=== Optional integration with Quarkus Amazon DynamoDB
+
+If desired, it is possible to use the Quarkus Amazon DynamoDB Client extension in conjunction with Camel Quarkus AWA2 DDB.
+Note that this optional and not at all mandatory.

Review comment:
       To my mind `"totally optional" == "optional and not at all mandatory"`.
   
   Happy to change it if necessary though.

##########
File path: integration-test-groups/aws2-quarkus-client/aws2-ddb/src/main/java/org/apache/camel/quarkus/component/aws2/ddb/it/Aws2DdbResource.java
##########
@@ -0,0 +1,321 @@
+/*
+ * 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.ddb.it;
+
+import java.net.URI;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.Consumes;
+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.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.Message;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.component.aws2.ddb.Ddb2Constants;
+import org.apache.camel.component.aws2.ddb.Ddb2Endpoint;
+import org.apache.camel.component.aws2.ddb.Ddb2Operations;
+import org.apache.camel.util.CollectionHelper;
+import org.eclipse.microprofile.config.inject.ConfigProperty;
+import software.amazon.awssdk.services.dynamodb.DynamoDbClient;
+import software.amazon.awssdk.services.dynamodb.model.AttributeAction;
+import software.amazon.awssdk.services.dynamodb.model.AttributeValue;
+import software.amazon.awssdk.services.dynamodb.model.AttributeValueUpdate;
+import software.amazon.awssdk.services.dynamodb.model.ComparisonOperator;
+import software.amazon.awssdk.services.dynamodb.model.Condition;
+import software.amazon.awssdk.services.dynamodb.model.KeysAndAttributes;
+import software.amazon.awssdk.services.dynamodb.model.ProvisionedThroughputDescription;
+
+@Path("/aws2-ddb")
+@ApplicationScoped
+public class Aws2DdbResource {
+
+    public enum Table {
+        basic, operations, stream
+    }
+
+    @ConfigProperty(name = "aws-ddb.table-name")
+    String tableName;
+
+    @ConfigProperty(name = "aws-ddb.operations-table-name")
+    String operationsTableName;
+
+    @ConfigProperty(name = "aws-ddb.stream-table-name")
+    String streamTableName;
+
+    @Inject
+    ProducerTemplate producerTemplate;
+
+    @Inject
+    CamelContext context;
+
+    @Inject
+    DynamoDbClient dynamoDB;
+
+    @SuppressWarnings("serial")
+    @Path("/item/{key}")
+    @POST
+    @Consumes(MediaType.TEXT_PLAIN)
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response post(String message,

Review comment:
       It's just a straight copy of the existing tests. But I can rename it.

##########
File path: integration-tests/aws2-quarkus-client-grouped/README.adoc
##########
@@ -0,0 +1,8 @@
+== Camel Quarkus AWS 2 With Quarkus AW2 Client extensions grouped integration tests
+
+This module allows executing all tests from `integration-test-groups/aws2-quarkus-client/*` grouped together.
+See the https://camel.apache.org/camel-quarkus/latest/contributor-guide/extension-testing.html#_grouping[Grouping section] of the Contributor guide for more details.
+
+=== Mock backend vs. real service
+
+Please refer to link:../../integration-test-groups/aws2-quarkus-client/README.adoc[integration-test-groups/aws2-quarkus-client/README.adoc] for more details.

Review comment:
       Browse the README on my branch and click the link. It works for me.
   
   https://github.com/jamesnetherton/camel-quarkus/tree/test-quarkus-awsddb-client/integration-tests/aws2-quarkus-client-grouped




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] jamesnetherton commented on a change in pull request #3133: Test Quarkus DynamoDB extension with Camel Quarkus AWS 2 DDB

Posted by GitBox <gi...@apache.org>.
jamesnetherton commented on a change in pull request #3133:
URL: https://github.com/apache/camel-quarkus/pull/3133#discussion_r717723229



##########
File path: integration-test-groups/aws2-quarkus-client/aws2-ddb/src/main/java/org/apache/camel/quarkus/component/aws2/ddb/it/Aws2DdbResource.java
##########
@@ -0,0 +1,321 @@
+/*
+ * 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.ddb.it;
+
+import java.net.URI;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.Consumes;
+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.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.Message;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.component.aws2.ddb.Ddb2Constants;
+import org.apache.camel.component.aws2.ddb.Ddb2Endpoint;
+import org.apache.camel.component.aws2.ddb.Ddb2Operations;
+import org.apache.camel.util.CollectionHelper;
+import org.eclipse.microprofile.config.inject.ConfigProperty;
+import software.amazon.awssdk.services.dynamodb.DynamoDbClient;
+import software.amazon.awssdk.services.dynamodb.model.AttributeAction;
+import software.amazon.awssdk.services.dynamodb.model.AttributeValue;
+import software.amazon.awssdk.services.dynamodb.model.AttributeValueUpdate;
+import software.amazon.awssdk.services.dynamodb.model.ComparisonOperator;
+import software.amazon.awssdk.services.dynamodb.model.Condition;
+import software.amazon.awssdk.services.dynamodb.model.KeysAndAttributes;
+import software.amazon.awssdk.services.dynamodb.model.ProvisionedThroughputDescription;
+
+@Path("/aws2-ddb")
+@ApplicationScoped
+public class Aws2DdbResource {
+
+    public enum Table {
+        basic, operations, stream
+    }
+
+    @ConfigProperty(name = "aws-ddb.table-name")
+    String tableName;
+
+    @ConfigProperty(name = "aws-ddb.operations-table-name")
+    String operationsTableName;
+
+    @ConfigProperty(name = "aws-ddb.stream-table-name")
+    String streamTableName;
+
+    @Inject
+    ProducerTemplate producerTemplate;
+
+    @Inject
+    CamelContext context;
+
+    @Inject
+    DynamoDbClient dynamoDB;
+
+    @SuppressWarnings("serial")
+    @Path("/item/{key}")
+    @POST
+    @Consumes(MediaType.TEXT_PLAIN)
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response post(String message,

Review comment:
       It's just a straight copy of the existing tests. But I can rename it.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] jamesnetherton commented on a change in pull request #3133: Test Quarkus DynamoDB extension with Camel Quarkus AWS 2 DDB

Posted by GitBox <gi...@apache.org>.
jamesnetherton commented on a change in pull request #3133:
URL: https://github.com/apache/camel-quarkus/pull/3133#discussion_r717726482



##########
File path: integration-tests/aws2-quarkus-client-grouped/README.adoc
##########
@@ -0,0 +1,8 @@
+== Camel Quarkus AWS 2 With Quarkus AW2 Client extensions grouped integration tests
+
+This module allows executing all tests from `integration-test-groups/aws2-quarkus-client/*` grouped together.
+See the https://camel.apache.org/camel-quarkus/latest/contributor-guide/extension-testing.html#_grouping[Grouping section] of the Contributor guide for more details.
+
+=== Mock backend vs. real service
+
+Please refer to link:../../integration-test-groups/aws2-quarkus-client/README.adoc[integration-test-groups/aws2-quarkus-client/README.adoc] for more details.

Review comment:
       Browse the README on my branch and click the link. It works for me.
   
   https://github.com/jamesnetherton/camel-quarkus/tree/test-quarkus-awsddb-client/integration-tests/aws2-quarkus-client-grouped




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] aldettinger commented on a change in pull request #3133: Test Quarkus DynamoDB extension with Camel Quarkus AWS 2 DDB

Posted by GitBox <gi...@apache.org>.
aldettinger commented on a change in pull request #3133:
URL: https://github.com/apache/camel-quarkus/pull/3133#discussion_r717726338



##########
File path: docs/modules/ROOT/pages/reference/extensions/aws2-ddb.adoc
##########
@@ -45,3 +45,28 @@ Check the xref:user-guide/index.adoc[User guide] for more information about writ
 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
+
+=== Optional integration with Quarkus Amazon DynamoDB
+
+If desired, it is possible to use the Quarkus Amazon DynamoDB Client extension in conjunction with Camel Quarkus AWA2 DDB.
+Note that this optional and not at all mandatory.

Review comment:
       I felt it like a repetition, but there is no big requirement to change.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] aldettinger commented on pull request #3133: Test Quarkus DynamoDB extension with Camel Quarkus AWS 2 DDB

Posted by GitBox <gi...@apache.org>.
aldettinger commented on pull request #3133:
URL: https://github.com/apache/camel-quarkus/pull/3133#issuecomment-929361741


   And so I think #3116 could be closed once this one is merged.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] aldettinger commented on a change in pull request #3133: Test Quarkus DynamoDB extension with Camel Quarkus AWS 2 DDB

Posted by GitBox <gi...@apache.org>.
aldettinger commented on a change in pull request #3133:
URL: https://github.com/apache/camel-quarkus/pull/3133#discussion_r717701946



##########
File path: integration-test-groups/aws2-quarkus-client/aws2-ddb/src/main/java/org/apache/camel/quarkus/component/aws2/ddb/it/Aws2DdbResource.java
##########
@@ -0,0 +1,321 @@
+/*
+ * 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.ddb.it;
+
+import java.net.URI;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.stream.Collectors;
+import java.util.stream.Stream;
+
+import javax.enterprise.context.ApplicationScoped;
+import javax.inject.Inject;
+import javax.ws.rs.Consumes;
+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.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.QueryParam;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import org.apache.camel.CamelContext;
+import org.apache.camel.Message;
+import org.apache.camel.ProducerTemplate;
+import org.apache.camel.component.aws2.ddb.Ddb2Constants;
+import org.apache.camel.component.aws2.ddb.Ddb2Endpoint;
+import org.apache.camel.component.aws2.ddb.Ddb2Operations;
+import org.apache.camel.util.CollectionHelper;
+import org.eclipse.microprofile.config.inject.ConfigProperty;
+import software.amazon.awssdk.services.dynamodb.DynamoDbClient;
+import software.amazon.awssdk.services.dynamodb.model.AttributeAction;
+import software.amazon.awssdk.services.dynamodb.model.AttributeValue;
+import software.amazon.awssdk.services.dynamodb.model.AttributeValueUpdate;
+import software.amazon.awssdk.services.dynamodb.model.ComparisonOperator;
+import software.amazon.awssdk.services.dynamodb.model.Condition;
+import software.amazon.awssdk.services.dynamodb.model.KeysAndAttributes;
+import software.amazon.awssdk.services.dynamodb.model.ProvisionedThroughputDescription;
+
+@Path("/aws2-ddb")
+@ApplicationScoped
+public class Aws2DdbResource {
+
+    public enum Table {
+        basic, operations, stream
+    }
+
+    @ConfigProperty(name = "aws-ddb.table-name")
+    String tableName;
+
+    @ConfigProperty(name = "aws-ddb.operations-table-name")
+    String operationsTableName;
+
+    @ConfigProperty(name = "aws-ddb.stream-table-name")
+    String streamTableName;
+
+    @Inject
+    ProducerTemplate producerTemplate;
+
+    @Inject
+    CamelContext context;
+
+    @Inject
+    DynamoDbClient dynamoDB;
+
+    @SuppressWarnings("serial")
+    @Path("/item/{key}")
+    @POST
+    @Consumes(MediaType.TEXT_PLAIN)
+    @Produces(MediaType.TEXT_PLAIN)
+    public Response post(String message,

Review comment:
       Maybe method named createItem(...) ? putItem ?




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] aldettinger commented on pull request #3133: Test Quarkus DynamoDB extension with Camel Quarkus AWS 2 DDB

Posted by GitBox <gi...@apache.org>.
aldettinger commented on pull request #3133:
URL: https://github.com/apache/camel-quarkus/pull/3133#issuecomment-929361741


   And so I think #3116 could be closed once this one is merged.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [camel-quarkus] ppalaga merged pull request #3133: Test Quarkus DynamoDB extension with Camel Quarkus AWS 2 DDB

Posted by GitBox <gi...@apache.org>.
ppalaga merged pull request #3133:
URL: https://github.com/apache/camel-quarkus/pull/3133


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org