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 2021/05/17 12:08:54 UTC

[camel-kamelets] branch timestamp-router-action created (now aa24a8a)

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

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


      at aa24a8a  Added Timestamp Router action

This branch includes the following new commits:

     new 7ead31c  Added Timestamp Router action
     new b929f5e  Added Timestamp Router action
     new 660a223  Added Timestamp Router action
     new aa24a8a  Added Timestamp Router action

The 4 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/04: Added Timestamp Router action

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

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

commit 7ead31cd98265055232a7496620912932179d656
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon May 17 14:01:31 2021 +0200

    Added Timestamp Router action
---
 timestamp-router-action.kamelet.yaml | 38 ++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/timestamp-router-action.kamelet.yaml b/timestamp-router-action.kamelet.yaml
new file mode 100644
index 0000000..57a5ddc
--- /dev/null
+++ b/timestamp-router-action.kamelet.yaml
@@ -0,0 +1,38 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: timestamp-router-action
+  labels:
+    camel.apache.org/kamelet.type: "action"
+  annotations:
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+spec:
+  definition:
+    title: "Timestamp Router Action"
+    description: "Update the topic field as a function of the original topic name and the record timestamp."
+    properties:
+      topicFormat:
+        title: Topic Format
+        description: Format string which can contain '$[topic]' and '$[timestamp]' as placeholders for the topic and timestamp, respectively.
+        type: string
+        default: "$[topic]-$[timestamp]"
+      timestampFormat:
+        title: Timestamp Format
+        description: Format string for the timestamp that is compatible with java.text.SimpleDateFormat.
+        type: string
+        default: "yyyyMMdd"
+    type: object
+  dependencies:
+  - github:apache.camel-kamelets:camel-kamelets-utils:main-SNAPSHOT
+  flow:
+    from:
+      uri: kamelet:source
+      steps:
+      - set-property:
+          name: "topicFormat"
+          constant: "{{topicFormat}}"
+      - set-property:
+          name: "timestampFormat"
+          constant: "{{timestampFormat}}"
+      - bean: "org.apache.camel.kamelets.utils.transform.kafka.TimestampRouter"

[camel-kamelets] 04/04: Added Timestamp Router action

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

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

commit aa24a8af7d6842fdf657fd5c2ed74646fa250791
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon May 17 14:08:32 2021 +0200

    Added Timestamp Router action
---
 .../images/kamelets/timestamp-router-action.svg    | 59 +++++++++++++++++++
 .../ROOT/pages/timestamp-router-action.adoc        | 66 ++++++++++++++++++++++
 2 files changed, 125 insertions(+)

diff --git a/docs/modules/ROOT/assets/images/kamelets/timestamp-router-action.svg b/docs/modules/ROOT/assets/images/kamelets/timestamp-router-action.svg
new file mode 100644
index 0000000..fa06352
--- /dev/null
+++ b/docs/modules/ROOT/assets/images/kamelets/timestamp-router-action.svg
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<svg
+   xmlns:dc="http://purl.org/dc/elements/1.1/"
+   xmlns:cc="http://creativecommons.org/ns#"
+   xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+   xmlns:svg="http://www.w3.org/2000/svg"
+   xmlns="http://www.w3.org/2000/svg"
+   xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+   xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+   viewBox="0 -256 1792 1792"
+   id="svg3025"
+   version="1.1"
+   inkscape:version="0.48.3.1 r9886"
+   width="100%"
+   height="100%"
+   sodipodi:docname="cog_font_awesome.svg">
+  <metadata
+     id="metadata3035">
+    <rdf:RDF>
+      <cc:Work
+         rdf:about="">
+        <dc:format>image/svg+xml</dc:format>
+        <dc:type
+           rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+      </cc:Work>
+    </rdf:RDF>
+  </metadata>
+  <defs
+     id="defs3033" />
+  <sodipodi:namedview
+     pagecolor="#ffffff"
+     bordercolor="#666666"
+     borderopacity="1"
+     objecttolerance="10"
+     gridtolerance="10"
+     guidetolerance="10"
+     inkscape:pageopacity="0"
+     inkscape:pageshadow="2"
+     inkscape:window-width="640"
+     inkscape:window-height="480"
+     id="namedview3031"
+     showgrid="false"
+     inkscape:zoom="0.13169643"
+     inkscape:cx="896"
+     inkscape:cy="896"
+     inkscape:window-x="0"
+     inkscape:window-y="25"
+     inkscape:window-maximized="0"
+     inkscape:current-layer="svg3025" />
+  <g
+     transform="matrix(1,0,0,-1,121.49153,1285.4237)"
+     id="g3027">
+    <path
+       d="m 1024,640 q 0,106 -75,181 -75,75 -181,75 -106,0 -181,-75 -75,-75 -75,-181 0,-106 75,-181 75,-75 181,-75 106,0 181,75 75,75 75,181 z m 512,109 V 527 q 0,-12 -8,-23 -8,-11 -20,-13 l -185,-28 q -19,-54 -39,-91 35,-50 107,-138 10,-12 10,-25 0,-13 -9,-23 -27,-37 -99,-108 -72,-71 -94,-71 -12,0 -26,9 l -138,108 q -44,-23 -91,-38 -16,-136 -29,-186 -7,-28 -36,-28 H 657 q -14,0 -24.5,8.5 Q 622,-111 621,-98 L 593,86 q -49,16 -90,37 L 362,16 Q 352,7 337,7 323,7 312,18 186,132 147,186 q -7 [...]
+       id="path3029"
+       inkscape:connector-curvature="0"
+       style="fill:currentColor" />
+  </g>
+</svg>
diff --git a/docs/modules/ROOT/pages/timestamp-router-action.adoc b/docs/modules/ROOT/pages/timestamp-router-action.adoc
new file mode 100644
index 0000000..b60a4f4
--- /dev/null
+++ b/docs/modules/ROOT/pages/timestamp-router-action.adoc
@@ -0,0 +1,66 @@
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT
+= image:kamelets/timestamp-router-action.svg[] Timestamp Router Action
+
+*Provided by: "Apache Software Foundation"*
+
+Update the topic field as a function of the original topic name and the record timestamp.
+
+== Configuration Options
+
+The following table summarizes the configuration options available for the `timestamp-router-action` Kamelet:
+[width="100%",cols="2,^2,3,^2,^2,^3",options="header"]
+|===
+| Property| Name| Description| Type| Default| Example
+| timestampFormat| Timestamp Format| Format string for the timestamp that is compatible with java.text.SimpleDateFormat.| string| `"yyyyMMdd"`| 
+| topicFormat| Topic Format| Format string which can contain '$[topic]' and '$[timestamp]' as placeholders for the topic and timestamp, respectively.| string| `"$[topic]-$[timestamp]"`| 
+|===
+
+NOTE: Fields marked with ({empty}*) are mandatory.
+
+== Usage
+
+This section summarizes how the `timestamp-router-action` can be used in various contexts.
+
+=== Knative Action
+
+The `timestamp-router-action` Kamelet can be used as intermediate step in a binding.
+
+.timestamp-router-action-binding.yaml
+[source,yaml]
+----
+apiVersion: camel.apache.org/v1alpha1
+kind: KameletBinding
+metadata:
+  name: timestamp-router-action-binding
+spec:
+  source:
+    ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: timer-source
+    properties:
+      message: "Hello"
+  steps:
+  - ref:
+      kind: Kamelet
+      apiVersion: camel.apache.org/v1alpha1
+      name: timestamp-router-action
+  sink:
+    ref:
+      kind: InMemoryChannel
+      apiVersion: messaging.knative.dev/v1
+      name: mychannel
+
+----
+
+Make sure you have xref:latest@camel-k::installation/installation.adoc[Camel K installed] into the Kubernetes cluster you're connected to.
+
+Save the `timestamp-router-action-binding.yaml` file into your hard drive, then configure it according to your needs.
+
+You can run the action using the following command:
+
+[source,shell]
+----
+kubectl apply -f timestamp-router-action-binding.yaml
+----
+// THIS FILE IS AUTOMATICALLY GENERATED: DO NOT EDIT

[camel-kamelets] 02/04: Added Timestamp Router action

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

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

commit b929f5e99f266696a891d14eab23b2a1ad2059c9
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon May 17 14:07:56 2021 +0200

    Added Timestamp Router action
---
 .../kamelets/timestamp-router-action.kamelet.yaml  | 38 ++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/library/camel-kamelets-catalog/src/main/resources/kamelets/timestamp-router-action.kamelet.yaml b/library/camel-kamelets-catalog/src/main/resources/kamelets/timestamp-router-action.kamelet.yaml
new file mode 100644
index 0000000..57a5ddc
--- /dev/null
+++ b/library/camel-kamelets-catalog/src/main/resources/kamelets/timestamp-router-action.kamelet.yaml
@@ -0,0 +1,38 @@
+apiVersion: camel.apache.org/v1alpha1
+kind: Kamelet
+metadata:
+  name: timestamp-router-action
+  labels:
+    camel.apache.org/kamelet.type: "action"
+  annotations:
+    camel.apache.org/kamelet.icon: "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjxzdmcKICAgeG1sbnM6ZGM9Imh0dHA6Ly9wdXJsLm9yZy9kYy9lbGVtZW50cy8xLjEvIgogICB4bWxuczpjYz0iaHR0cDovL2NyZWF0aXZlY29tbW9ucy5vcmcvbnMjIgogICB4bWxuczpyZGY9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkvMDIvMjItcmRmLXN5bnRheC1ucyMiCiAgIHhtbG5zOnN2Zz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciCiAgIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIKICAgeG1sbnM6c29kaXBvZGk9Imh0dHA6Ly9zb2RpcG [...]
+    camel.apache.org/provider: "Apache Software Foundation"
+spec:
+  definition:
+    title: "Timestamp Router Action"
+    description: "Update the topic field as a function of the original topic name and the record timestamp."
+    properties:
+      topicFormat:
+        title: Topic Format
+        description: Format string which can contain '$[topic]' and '$[timestamp]' as placeholders for the topic and timestamp, respectively.
+        type: string
+        default: "$[topic]-$[timestamp]"
+      timestampFormat:
+        title: Timestamp Format
+        description: Format string for the timestamp that is compatible with java.text.SimpleDateFormat.
+        type: string
+        default: "yyyyMMdd"
+    type: object
+  dependencies:
+  - github:apache.camel-kamelets:camel-kamelets-utils:main-SNAPSHOT
+  flow:
+    from:
+      uri: kamelet:source
+      steps:
+      - set-property:
+          name: "topicFormat"
+          constant: "{{topicFormat}}"
+      - set-property:
+          name: "timestampFormat"
+          constant: "{{timestampFormat}}"
+      - bean: "org.apache.camel.kamelets.utils.transform.kafka.TimestampRouter"

[camel-kamelets] 03/04: Added Timestamp Router action

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

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

commit 660a2236cb4ca66ab213fa54297fe85f10edb5a5
Author: Andrea Cosentino <an...@gmail.com>
AuthorDate: Mon May 17 14:08:22 2021 +0200

    Added Timestamp Router action
---
 docs/modules/ROOT/nav.adoc | 1 +
 1 file changed, 1 insertion(+)

diff --git a/docs/modules/ROOT/nav.adoc b/docs/modules/ROOT/nav.adoc
index e25904b..bbc0a0e 100644
--- a/docs/modules/ROOT/nav.adoc
+++ b/docs/modules/ROOT/nav.adoc
@@ -73,6 +73,7 @@
 * xref:ROOT:telegram-sink.adoc[image:kamelets/telegram-sink.svg[] Telegram Sink]
 * xref:ROOT:telegram-source.adoc[image:kamelets/telegram-source.svg[] Telegram Source]
 * xref:ROOT:timer-source.adoc[image:kamelets/timer-source.svg[] Timer Source]
+* xref:ROOT:timestamp-router-action.adoc[image:kamelets/timestamp-router-action.svg[] Timestamp Router Action]
 * xref:ROOT:twitter-directmessage-source.adoc[image:kamelets/twitter-directmessage-source.svg[] Twitter Direct Message Source]
 * xref:ROOT:twitter-search-source.adoc[image:kamelets/twitter-search-source.svg[] Twitter Search Source]
 * xref:ROOT:twitter-timeline-source.adoc[image:kamelets/twitter-timeline-source.svg[] Twitter Timeline Source]