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 2023/03/31 12:16:26 UTC

[camel-kamelets] branch c-kamelets-1430 created (now a1141b0f)

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

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


      at a1141b0f Create a Kamelet action for setting a specific kafka key based on a particular header incoming

This branch includes the following new commits:

     new f61c2b8e Create a Kamelet action for setting a specific kafka key based on a particular header incoming
     new fb2aeb35 Create a Kamelet action for setting a specific kafka key based on a particular header incoming
     new c68a1d7d Create a Kamelet action for setting a specific kafka key based on a particular header incoming
     new 602224d3 Create a Kamelet action for setting a specific kafka key based on a particular header incoming
     new a1141b0f Create a Kamelet action for setting a specific kafka key based on a particular header incoming

The 5 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] 03/05: Create a Kamelet action for setting a specific kafka key based on a particular header incoming

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

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

commit c68a1d7d15204159313f8f764d668b5c49015f8f
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Mar 31 14:11:23 2023 +0200

    Create a Kamelet action for setting a specific kafka key based on a particular header incoming
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 docs/modules/ROOT/nav.adoc                 | 1 +
 kamelets/set-kafka-key-action.kamelet.yaml | 2 +-
 2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index b5f48109..51da4962 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -180,6 +180,7 @@
 * xref:salesforce-source.adoc[]
 * xref:salesforce-update-sink.adoc[]
 * xref:scp-sink.adoc[]
+* xref:set-kafka-key-action.adoc[]
 * xref:sftp-sink.adoc[]
 * xref:sftp-source.adoc[]
 * xref:slack-sink.adoc[]
diff --git a/kamelets/set-kafka-key-action.kamelet.yaml b/kamelets/set-kafka-key-action.kamelet.yaml
index b2d9c68e..dec7d997 100644
--- a/kamelets/set-kafka-key-action.kamelet.yaml
+++ b/kamelets/set-kafka-key-action.kamelet.yaml
@@ -35,7 +35,7 @@ spec:
 
       The headerName parameter allows you to specify which header value to set as Kafka Key.
     required:
-      - field
+      - headerName
     properties:
       headerName:
         title: Field


[camel-kamelets] 04/05: Create a Kamelet action for setting a specific kafka key based on a particular header incoming

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

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

commit 602224d34b01876e351e1a4606e7363625fded17
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Mar 31 14:11:55 2023 +0200

    Create a Kamelet action for setting a specific kafka key based on a particular header incoming
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../src/main/resources/kamelets/set-kafka-key-action.kamelet.yaml       | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/library/camel-kamelets/src/main/resources/kamelets/set-kafka-key-action.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/set-kafka-key-action.kamelet.yaml
index b2d9c68e..dec7d997 100644
--- a/library/camel-kamelets/src/main/resources/kamelets/set-kafka-key-action.kamelet.yaml
+++ b/library/camel-kamelets/src/main/resources/kamelets/set-kafka-key-action.kamelet.yaml
@@ -35,7 +35,7 @@ spec:
 
       The headerName parameter allows you to specify which header value to set as Kafka Key.
     required:
-      - field
+      - headerName
     properties:
       headerName:
         title: Field


[camel-kamelets] 02/05: Create a Kamelet action for setting a specific kafka key based on a particular header incoming

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

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

commit fb2aeb35db5fda8844405f5bc762cfdd1c9c5f4f
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Mar 31 14:10:52 2023 +0200

    Create a Kamelet action for setting a specific kafka key based on a particular header incoming
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../kamelets/set-kafka-key-action.kamelet.yaml     | 68 ++++++++++++++++++++++
 1 file changed, 68 insertions(+)

diff --git a/library/camel-kamelets/src/main/resources/kamelets/set-kafka-key-action.kamelet.yaml b/library/camel-kamelets/src/main/resources/kamelets/set-kafka-key-action.kamelet.yaml
new file mode 100644
index 00000000..b2d9c68e
--- /dev/null
+++ b/library/camel-kamelets/src/main/resources/kamelets/set-kafka-key-action.kamelet.yaml
@@ -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.
+# ---------------------------------------------------------------------------
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: set-kafka-key-action
+  labels:
+    camel.apache.org/kamelet.type: "action"
+  annotations:
+    camel.apache.org/kamelet.support.level: "Stable"
+    camel.apache.org/catalog.version: "4.0.0-SNAPSHOT"
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+    camel.apache.org/kamelet.group: "Actions"
+    camel.apache.org/kamelet.namespace: "Kafka"
+spec:
+  definition:
+    title: "Set Kafka Key Action"
+    description: |-
+      Set Kafka Key based on a specific incoming header value from the message body.
+
+      The headerName parameter allows you to specify which header value to set as Kafka Key.
+    required:
+      - field
+    properties:
+      headerName:
+        title: Field
+        description: The name of the header to set as Kafka Key
+        type: string
+      forceHeaderDeletion:
+        title: Force Header Deletion
+        description: If true, it will remove the header with name headerName from the Exchange after setting it as Kafka Key
+        type: boolean
+        x-descriptors:
+          - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+        default: false
+    type: object
+  dependencies:
+  - "camel:kamelet"
+  - "camel:core"
+  template:
+    from:
+      uri: kamelet:source
+      steps:
+      - set-header:
+          name: kafka.KEY
+          simple: "${header.{{headerName}}}"
+      - choice:
+          precondition: true
+          when:
+            - simple: '${properties:forceHeaderDeletion:true}'
+              steps:
+              - remove-header:
+                  name: "{{headerName}}" 


[camel-kamelets] 01/05: Create a Kamelet action for setting a specific kafka key based on a particular header incoming

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

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

commit f61c2b8ed880ab10eaca6c6c0fa13adceb1eb006
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Mar 31 14:09:53 2023 +0200

    Create a Kamelet action for setting a specific kafka key based on a particular header incoming
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 kamelets/set-kafka-key-action.kamelet.yaml | 68 ++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)

diff --git a/kamelets/set-kafka-key-action.kamelet.yaml b/kamelets/set-kafka-key-action.kamelet.yaml
new file mode 100644
index 00000000..b2d9c68e
--- /dev/null
+++ b/kamelets/set-kafka-key-action.kamelet.yaml
@@ -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.
+# ---------------------------------------------------------------------------
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: set-kafka-key-action
+  labels:
+    camel.apache.org/kamelet.type: "action"
+  annotations:
+    camel.apache.org/kamelet.support.level: "Stable"
+    camel.apache.org/catalog.version: "4.0.0-SNAPSHOT"
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+    camel.apache.org/kamelet.group: "Actions"
+    camel.apache.org/kamelet.namespace: "Kafka"
+spec:
+  definition:
+    title: "Set Kafka Key Action"
+    description: |-
+      Set Kafka Key based on a specific incoming header value from the message body.
+
+      The headerName parameter allows you to specify which header value to set as Kafka Key.
+    required:
+      - field
+    properties:
+      headerName:
+        title: Field
+        description: The name of the header to set as Kafka Key
+        type: string
+      forceHeaderDeletion:
+        title: Force Header Deletion
+        description: If true, it will remove the header with name headerName from the Exchange after setting it as Kafka Key
+        type: boolean
+        x-descriptors:
+          - 'urn:alm:descriptor:com.tectonic.ui:checkbox'
+        default: false
+    type: object
+  dependencies:
+  - "camel:kamelet"
+  - "camel:core"
+  template:
+    from:
+      uri: kamelet:source
+      steps:
+      - set-header:
+          name: kafka.KEY
+          simple: "${header.{{headerName}}}"
+      - choice:
+          precondition: true
+          when:
+            - simple: '${properties:forceHeaderDeletion:true}'
+              steps:
+              - remove-header:
+                  name: "{{headerName}}" 


[camel-kamelets] 05/05: Create a Kamelet action for setting a specific kafka key based on a particular header incoming

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

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

commit a1141b0f712d43d88aaf033b6c523f6593407749
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Fri Mar 31 14:15:08 2023 +0200

    Create a Kamelet action for setting a specific kafka key based on a particular header incoming
    
    Signed-off-by: Andrea Cosentino <an...@gmail.com>
---
 .../org/apache/camel/kamelets/maven/plugin/ValidateKameletsMojo.java    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/library/kamelets-maven-plugin/src/main/java/org/apache/camel/kamelets/maven/plugin/ValidateKameletsMojo.java b/library/kamelets-maven-plugin/src/main/java/org/apache/camel/kamelets/maven/plugin/ValidateKameletsMojo.java
index 6b8d0861..efab1b69 100644
--- a/library/kamelets-maven-plugin/src/main/java/org/apache/camel/kamelets/maven/plugin/ValidateKameletsMojo.java
+++ b/library/kamelets-maven-plugin/src/main/java/org/apache/camel/kamelets/maven/plugin/ValidateKameletsMojo.java
@@ -102,7 +102,7 @@ public class ValidateKameletsMojo extends AbstractMojo {
                                         .map(ComponentModel.EndpointOptionModel::getName)
                                         .collect(Collectors.toList());
                         for (Map.Entry<String, Object> entry : p.entrySet()) {
-                            if (!entry.getKey().equals("period") && (!name.equals("sftp-source") && !name.equals("kafka-ssl-source") && !name.equals("timer-source") && !name.equals("cron-source") && !name.equals("fhir-source") && !name.equals("beer-source") && !name.equals("cassandra-source") && !name.equals("cassandra-sink"))) {
+                            if (!entry.getKey().equals("period") && (!name.equals("set-kafka-key-action") && !name.equals("sftp-source") && !name.equals("kafka-ssl-source") && !name.equals("timer-source") && !name.equals("cron-source") && !name.equals("fhir-source") && !name.equals("beer-source") && !name.equals("cassandra-source") && !name.equals("cassandra-sink"))) {
                                 if (!ceInternal.contains(entry.getKey())) {
                                     getLog().error("Kamelet Name: " + name);
                                     getLog().error("Scheme Name: " + cleanName);