Skip to content

Commit 622edd6

Browse files
davsclausclaude
andcommitted
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 <noreply@anthropic.com>
1 parent 9ee904a commit 622edd6

2 files changed

Lines changed: 8 additions & 0 deletions

File tree

kamelets/timestamp-router-action.kamelet.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ spec:
4747
description: The name of the header containing a timestamp
4848
type: string
4949
default: "kafka.TIMESTAMP"
50+
topicHeaderName:
51+
title: Topic Header Name
52+
description: The name of the header containing the topic name. When not set, the default Kafka topic header (CamelKafkaTopic) is used.
53+
type: string
5054
type: object
5155
dependencies:
5256
- "camel:kamelet"
@@ -65,4 +69,7 @@ spec:
6569
- setProperty:
6670
name: "timestampHeaderName"
6771
constant: "{{timestampHeaderName}}"
72+
- setProperty:
73+
name: "topicHeaderName"
74+
constant: "{{?topicHeaderName}}"
6875
- bean: "org.apache.camel.component.kafka.transform.TimestampRouter"

tests/camel-kamelets-itest/src/test/resources/kafka/kafka-router-pipe.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ spec:
3535
properties:
3636
topicFormat: $[topic]_$[timestamp]
3737
timestampFormat: YYYY-MM-dd
38+
topicHeaderName: kafka.TOPIC
3839
- ref:
3940
kind: Kamelet
4041
apiVersion: camel.apache.org/v1

0 commit comments

Comments
 (0)