This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-kamelets.git
commit aa3469609b46873799e84b914dfc93842bc33e20 Author: Andrea Cosentino <[email protected]> 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"
