Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align timestamp router action #290

Merged
merged 3 commits into from
May 18, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion docs/modules/ROOT/pages/timestamp-router-action.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
10 changes: 9 additions & 1 deletion timestamp-router-action.kamelet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"