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 2022/10/06 09:49:07 UTC

[camel-kamelets] branch 1071-sqs created (now 6d04aeac)

This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a change to branch 1071-sqs
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git


      at 6d04aeac Duplicate some of headers with a different name - AWS SQS Source

This branch includes the following new commits:

     new 5ef86835 Duplicate some of headers with a different name - AWS SQS Source
     new 8620a751 Duplicate some of headers with a different name - AWS SQS Source
     new 6d04aeac Duplicate some of headers with a different name - AWS SQS Source

The 3 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[camel-kamelets] 01/03: Duplicate some of headers with a different name - AWS SQS Source

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch 1071-sqs
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 5ef868354d914d70002049afe0813d5ac7021b9c
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Oct 6 11:41:28 2022 +0200

    Duplicate some of headers with a different name - AWS SQS Source
---
 kamelets/aws-sqs-source.kamelet.yaml                     | 16 ++++++++++++++++
 .../camel/kamelets/catalog/KameletsCatalogTest.java      |  2 +-
 .../main/resources/kamelets/aws-sqs-source.kamelet.yaml  | 16 ++++++++++++++++
 3 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/kamelets/aws-sqs-source.kamelet.yaml b/kamelets/aws-sqs-source.kamelet.yaml
index c59f0c4f..89fa2291 100644
--- a/kamelets/aws-sqs-source.kamelet.yaml
+++ b/kamelets/aws-sqs-source.kamelet.yaml
@@ -137,9 +137,23 @@ spec:
           - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
         default: false
   dependencies:
+    - "camel:core"
     - "camel:aws2-sqs"
+    - "github:apache.camel-kamelets:camel-kamelets-utils:main-SNAPSHOT"
     - "camel:kamelet"
   template:
+    beans:
+      - name: renameHeaders
+        type: "#class:org.apache.camel.kamelets.utils.headers.DuplicateNamingHeaders"
+        property:
+          - key: prefix
+            value: 'CamelAwsSqs'
+          - key: renamingPrefix
+            value: 'aws.sqs.'
+          - key: mode
+            value: 'filtering'
+          - key: selectedHeaders
+            value: 'CamelAwsSqsReceiptHandle,CamelAwsSqsMessageId'
     from:
       uri: "aws2-sqs:{{queueNameOrArn}}"
       parameters:
@@ -156,4 +170,6 @@ spec:
         delay: "{{delay}}"
         greedy: "{{greedy}}"
       steps:
+      - process:
+          ref: "{{renameHeaders}}"
       - to: "kamelet:sink"
diff --git a/library/camel-kamelets-catalog/src/test/java/org/apache/camel/kamelets/catalog/KameletsCatalogTest.java b/library/camel-kamelets-catalog/src/test/java/org/apache/camel/kamelets/catalog/KameletsCatalogTest.java
index 31d21bbb..19811879 100644
--- a/library/camel-kamelets-catalog/src/test/java/org/apache/camel/kamelets/catalog/KameletsCatalogTest.java
+++ b/library/camel-kamelets-catalog/src/test/java/org/apache/camel/kamelets/catalog/KameletsCatalogTest.java
@@ -102,7 +102,7 @@ public class KameletsCatalogTest {
     @Test
     void testGetKameletsDependencies() throws Exception {
         List<String> deps = catalog.getKameletDependencies("aws-sqs-source");
-        assertEquals(2, deps.size());
+        assertEquals(4, deps.size());
         deps = catalog.getKameletDependencies("cassandra-sink");
         assertEquals(3, deps.size());
         assertEquals("camel:jackson", deps.get(0));
diff --git a/library/camel-kamelets/src/main/resources/kamelets/aws-sqs-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/aws-sqs-source.kamelet.yaml
index c59f0c4f..89fa2291 100644
--- a/library/camel-kamelets/src/main/resources/kamelets/aws-sqs-source.kamelet.yaml
+++ b/library/camel-kamelets/src/main/resources/kamelets/aws-sqs-source.kamelet.yaml
@@ -137,9 +137,23 @@ spec:
           - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
         default: false
   dependencies:
+    - "camel:core"
     - "camel:aws2-sqs"
+    - "github:apache.camel-kamelets:camel-kamelets-utils:main-SNAPSHOT"
     - "camel:kamelet"
   template:
+    beans:
+      - name: renameHeaders
+        type: "#class:org.apache.camel.kamelets.utils.headers.DuplicateNamingHeaders"
+        property:
+          - key: prefix
+            value: 'CamelAwsSqs'
+          - key: renamingPrefix
+            value: 'aws.sqs.'
+          - key: mode
+            value: 'filtering'
+          - key: selectedHeaders
+            value: 'CamelAwsSqsReceiptHandle,CamelAwsSqsMessageId'
     from:
       uri: "aws2-sqs:{{queueNameOrArn}}"
       parameters:
@@ -156,4 +170,6 @@ spec:
         delay: "{{delay}}"
         greedy: "{{greedy}}"
       steps:
+      - process:
+          ref: "{{renameHeaders}}"
       - to: "kamelet:sink"


[camel-kamelets] 03/03: Duplicate some of headers with a different name - AWS SQS Source

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch 1071-sqs
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 6d04aeacc4c55e056f0487dfa24dc3a331a70fb6
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Oct 6 11:47:32 2022 +0200

    Duplicate some of headers with a different name - AWS SQS Source
---
 .../src/main/resources/kamelets/aws-sqs-source.kamelet.yaml             | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/library/camel-kamelets/src/main/resources/kamelets/aws-sqs-source.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/aws-sqs-source.kamelet.yaml
index 89fa2291..00846eb1 100644
--- a/library/camel-kamelets/src/main/resources/kamelets/aws-sqs-source.kamelet.yaml
+++ b/library/camel-kamelets/src/main/resources/kamelets/aws-sqs-source.kamelet.yaml
@@ -37,6 +37,8 @@ spec:
       Access Key/Secret Key are the basic method for authenticating to the AWS SQS Service. These parameters are optional because the Kamelet provides the 'useDefaultCredentialsProvider'.
       
       When using a default Credentials Provider the SQS client will load the credentials through this provider and won't use the static credential. This is reason for not having the access key and secret key as mandatory parameter for this Kamelet.
+
+      Two headers will be duplicated with different names for clarity at sink level, CamelAwsSqsMessageId will be duplicated into aws.sqs.message.id and CamelAwsSqsReceiptHandle will be duplicated in aws.sqs.receipt.handle
     required:
       - queueNameOrArn
       - region


[camel-kamelets] 02/03: Duplicate some of headers with a different name - AWS SQS Source

Posted by ac...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

acosentino pushed a commit to branch 1071-sqs
in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git

commit 8620a751ed4ea769550ad719230bad8de001aac9
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Thu Oct 6 11:46:00 2022 +0200

    Duplicate some of headers with a different name - AWS SQS Source
---
 kamelets/aws-sqs-source.kamelet.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/kamelets/aws-sqs-source.kamelet.yaml b/kamelets/aws-sqs-source.kamelet.yaml
index 89fa2291..00846eb1 100644
--- a/kamelets/aws-sqs-source.kamelet.yaml
+++ b/kamelets/aws-sqs-source.kamelet.yaml
@@ -37,6 +37,8 @@ spec:
       Access Key/Secret Key are the basic method for authenticating to the AWS SQS Service. These parameters are optional because the Kamelet provides the 'useDefaultCredentialsProvider'.
       
       When using a default Credentials Provider the SQS client will load the credentials through this provider and won't use the static credential. This is reason for not having the access key and secret key as mandatory parameter for this Kamelet.
+
+      Two headers will be duplicated with different names for clarity at sink level, CamelAwsSqsMessageId will be duplicated into aws.sqs.message.id and CamelAwsSqsReceiptHandle will be duplicated in aws.sqs.receipt.handle
     required:
       - queueNameOrArn
       - region