48.  Message Timestamp Router Action


更新 topic 字段作为原始主题名称和记录的 timestamp 字段的功能。

48.1. 配置选项

下表总结了 message-timestamp-router-action Kamelet 的配置选项:

Expand
属性名称描述类型默认示例

timestampKeys *

时间戳密钥

以逗号分隔的 Timestamp 键列表。时间戳取自第一个找到的字段。

字符串

  

timestampFormat

时间戳格式

与 java.text.SimpleDateFormat 兼容的时间戳的格式字符串。

字符串

yyyyMMdd

 

timestampKeyFormat

时间戳密钥格式

时间戳密钥的格式。可能的值有 时间戳,或者任何与 java.text.SimpleDateFormat 兼容的时间戳格式字符串。如果 时间戳,自 1970 年起,该字段将评估为毫秒(作为 UNIX Timestamp)。

字符串

timestamp

 

topicFormat

主题格式

格式字符串,可分别包含 '$[topic]' 和 '$[timestamp]' 作为主题和时间戳的占位符。

字符串

topic-$[timestamp]

 

* = 标记为星号的字段 是必需的

48.2. 依赖项

在运行时,message-timestamp-router-action Kamelet 依赖于以下依赖项的存在:

<dependencies>
  <dependency>
    <groupId>org.apache.camel.quarkus</groupId>
    <artifact>camel-quarkus-core</artifact>
  </dependency>
  <dependency>
    <groupId>org.apache.camel.quarkus</groupId>
    <artifact>camel-quarkus-jackson</artifact>
  </dependency>
  <dependency>
    <groupId>org.apache.camel.quarkus</groupId>
    <artifact>camel-quarkus-kafka</artifact>
  </dependency>
  <dependency>
    <groupId>org.apache.camel.quarkus</groupId>
    <artifact>camel-quarkus-kamelet</artifact>
  </dependency>
  <dependency>
    <groupId>org.apache.camel.kamelets</groupId>
    <artifact>camel-kamelets-utils</artifact>
    <version>{kamelets-utils-version}</version>
  </dependency>
</dependencies>

48.3. kamelets 源文件

https://github.com/apache/camel-kamelets/blob/4.14.x/kamelets/message-timestamp-router-action.kamelet.yaml

Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部