From 48376a5336f083da55b8aac3f17650329ed8dfeb Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Tue, 18 May 2021 11:37:06 +0200 Subject: [PATCH 1/3] Timestamp Router action updated --- timestamp-router-action.kamelet.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/timestamp-router-action.kamelet.yaml b/timestamp-router-action.kamelet.yaml index fbe91dec7..5d55b7eb6 100644 --- a/timestamp-router-action.kamelet.yaml +++ b/timestamp-router-action.kamelet.yaml @@ -17,12 +17,17 @@ spec: 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]" + default: "topic-$[timestamp]" timestampFormat: title: Timestamp Format description: Format string for the timestamp that is compatible with java.text.SimpleDateFormat. type: string default: "yyyyMMdd" + timestampHeaderName: + title: Timestamp Header Name + description: The name of the header containing a timestamp + type: string + default: "kafka.TIMESTAMP" type: object dependencies: - github:apache.camel-kamelets:camel-kamelets-utils:main-SNAPSHOT @@ -38,4 +43,7 @@ spec: - set-property: name: "timestampFormat" constant: "{{timestampFormat}}" + - set-property: + name: "timestampHeaderName" + constant: "{{timestampHeaderName}}" - bean: "org.apache.camel.kamelets.utils.transform.kafka.TimestampRouter" From cd1be1d1fb6793273d4d291c4c338c8e44545d8e Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Tue, 18 May 2021 11:40:15 +0200 Subject: [PATCH 2/3] Regen catalog --- .../kamelets/timestamp-router-action.kamelet.yaml | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 index fbe91dec7..5d55b7eb6 100644 --- 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 @@ -17,12 +17,17 @@ spec: 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]" + default: "topic-$[timestamp]" timestampFormat: title: Timestamp Format description: Format string for the timestamp that is compatible with java.text.SimpleDateFormat. type: string default: "yyyyMMdd" + timestampHeaderName: + title: Timestamp Header Name + description: The name of the header containing a timestamp + type: string + default: "kafka.TIMESTAMP" type: object dependencies: - github:apache.camel-kamelets:camel-kamelets-utils:main-SNAPSHOT @@ -38,4 +43,7 @@ spec: - set-property: name: "timestampFormat" constant: "{{timestampFormat}}" + - set-property: + name: "timestampHeaderName" + constant: "{{timestampHeaderName}}" - bean: "org.apache.camel.kamelets.utils.transform.kafka.TimestampRouter" From 55c21b8252ca4474cefc860ce6bcf16079c42ded Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Tue, 18 May 2021 11:41:57 +0200 Subject: [PATCH 3/3] Regen --- docs/modules/ROOT/pages/timestamp-router-action.adoc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/modules/ROOT/pages/timestamp-router-action.adoc b/docs/modules/ROOT/pages/timestamp-router-action.adoc index b60a4f49d..269de42cb 100644 --- a/docs/modules/ROOT/pages/timestamp-router-action.adoc +++ b/docs/modules/ROOT/pages/timestamp-router-action.adoc @@ -12,7 +12,8 @@ The following table summarizes the configuration options available for the `time |=== | 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]"`| +| timestampHeaderName| Timestamp Header Name| The name of the header containing a timestamp| string| `"kafka.TIMESTAMP"`| +| 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.