This is an automated email from the ASF dual-hosted git repository.
davsclaus 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 622edd686 Fix #2868: Add topicHeaderName to timestamp-router-action
kamelet
622edd686 is described below
commit 622edd68670ad881ff6df7728580ec70729a8d81
Author: Claus Ibsen <[email protected]>
AuthorDate: Tue Jun 23 09:13:44 2026 +0200
Fix #2868: Add topicHeaderName to timestamp-router-action kamelet
The CAMEL-23584 rename of kafka.TOPIC to CamelKafkaTopic broke the
kafka-router-pipe integration test because HTTP components filter
Camel*-prefixed headers from incoming requests. Adding an optional
topicHeaderName property lets the test (and users) specify which
header carries the topic name, falling back to CamelKafkaTopic.
Co-Authored-By: Claude Opus 4.6 <[email protected]>
---
kamelets/timestamp-router-action.kamelet.yaml | 7 +++++++
.../src/test/resources/kafka/kafka-router-pipe.yaml | 1 +
2 files changed, 8 insertions(+)
diff --git a/kamelets/timestamp-router-action.kamelet.yaml
b/kamelets/timestamp-router-action.kamelet.yaml
index ffdfd719b..cc01d8566 100644
--- a/kamelets/timestamp-router-action.kamelet.yaml
+++ b/kamelets/timestamp-router-action.kamelet.yaml
@@ -47,6 +47,10 @@ spec:
description: The name of the header containing a timestamp
type: string
default: "kafka.TIMESTAMP"
+ topicHeaderName:
+ title: Topic Header Name
+ description: The name of the header containing the topic name. When
not set, the default Kafka topic header (CamelKafkaTopic) is used.
+ type: string
type: object
dependencies:
- "camel:kamelet"
@@ -65,4 +69,7 @@ spec:
- setProperty:
name: "timestampHeaderName"
constant: "{{timestampHeaderName}}"
+ - setProperty:
+ name: "topicHeaderName"
+ constant: "{{?topicHeaderName}}"
- bean: "org.apache.camel.component.kafka.transform.TimestampRouter"
diff --git
a/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-router-pipe.yaml
b/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-router-pipe.yaml
index 766ee5767..bea0dd70d 100644
--- a/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-router-pipe.yaml
+++ b/tests/camel-kamelets-itest/src/test/resources/kafka/kafka-router-pipe.yaml
@@ -35,6 +35,7 @@ spec:
properties:
topicFormat: $[topic]_$[timestamp]
timestampFormat: YYYY-MM-dd
+ topicHeaderName: kafka.TOPIC
- ref:
kind: Kamelet
apiVersion: camel.apache.org/v1