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


The following commit(s) were added to refs/heads/main by this push:
     new 1ef809a  Added TimestampRouter bean to library
1ef809a is described below

commit 1ef809a37bec507b73cb2a7c0e42a47cae1a21cd
Author: Andrea Cosentino <[email protected]>
AuthorDate: Mon May 17 13:25:48 2021 +0200

    Added TimestampRouter bean to library
---
 .../apache/camel/kamelets/utils/transform/kafka/TimestampRouter.java  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/kafka/TimestampRouter.java
 
b/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/kafka/TimestampRouter.java
index a0b2e61..6ea2066 100644
--- 
a/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/kafka/TimestampRouter.java
+++ 
b/library/camel-kamelets-utils/src/main/java/org/apache/camel/kamelets/utils/transform/kafka/TimestampRouter.java
@@ -30,9 +30,9 @@ import java.util.regex.Pattern;
 public class TimestampRouter {
 
     public void process(@ExchangeProperty("topicFormat") String topicFormat, 
@ExchangeProperty("timestampFormat") String timestampFormat, Exchange ex) {
-        final Pattern TOPIC = Pattern.compile("[topic]", Pattern.LITERAL);
+        final Pattern TOPIC = Pattern.compile("$[topic]", Pattern.LITERAL);
 
-        final Pattern TIMESTAMP = Pattern.compile("[timestamp]", 
Pattern.LITERAL);
+        final Pattern TIMESTAMP = Pattern.compile("$[timestamp]", 
Pattern.LITERAL);
 
         final SimpleDateFormat fmt = new SimpleDateFormat(timestampFormat);
         fmt.setTimeZone(TimeZone.getTimeZone("UTC"));

Reply via email to