[ 
https://issues.apache.org/jira/browse/CAMEL-23584?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrea Cosentino resolved CAMEL-23584.
--------------------------------------
    Resolution: Fixed

Implemented and merged on main (4.21.0) and backported to camel-4.18.x (4.18.3) 
and camel-4.14.x (4.14.8). Upgrade-guide entries added on main for the 4_21, 
4_18, and 4_14 guides.

_Resolved by Claude Code on behalf of Andrea Cosentino_

> camel-kafka - align Exchange header constant names with Camel naming 
> convention
> -------------------------------------------------------------------------------
>
>                 Key: CAMEL-23584
>                 URL: https://issues.apache.org/jira/browse/CAMEL-23584
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-kafka
>            Reporter: Andrea Cosentino
>            Assignee: Andrea Cosentino
>            Priority: Major
>             Fix For: 4.14.8, 4.18.3, 4.21.0
>
>
> {{KafkaConstants}} exposes producer-read headers with dotted lowercase values:
> * {{OVERRIDE_TOPIC = "kafka.OVERRIDE_TOPIC"}} - reroutes producer messages to 
> a different topic
> * {{OVERRIDE_TIMESTAMP = "kafka.OVERRIDE_TIMESTAMP"}} - overrides record 
> timestamp
> * {{KEY = "kafka.KEY"}} - record key (partitioning input)
> * {{PARTITION_KEY = "kafka.PARTITION_KEY"}} - explicit partition
> * Consumer-set (also defined): {{TOPIC}}, {{PARTITION}}, {{OFFSET}}
> Rename to {{CamelKafka<Name>}}; widely used in the Camel ecosystem so the 
> upgrade-guide entry must be prominent.
> h3. Fix shape
> Rename the *string value* of each producer-read header constant to 
> {{Camel<Component><Name>}}; keep the Java field name unchanged so routes that 
> reference the constants symbolically continue to compile and run. Update 
> tests that use the literal string values; regenerate component catalog JSON 
> and docs; add an upgrade-guide entry in {{camel-4x-upgrade-guide-4_21.adoc}} 
> (and matching 4_18 / 4_14 for backports where the component existed in those 
> branches).
> h3. References
> * Tracker: CAMEL-23577
> * Precedent (rename pattern): CAMEL-23526 (camel-cxf)
> * Alternative pattern (HeaderFilterStrategy approach): CAMEL-23532 
> (camel-vertx-websocket / camel-atmosphere-websocket / camel-iggy)



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to