[backport camel-4.14.x] CAMEL-23584: camel-kafka - align Exchange header constant names with Camel naming convention#23632
Merged
Conversation
…der constant names with Camel naming convention Backport of CAMEL-23584 to the camel-4.14.x maintenance branch. Renames the Exchange header string values in KafkaConstants from the non-Camel-prefixed "kafka.*" namespace to the project-wide "CamelKafka*" PascalCase convention. The Java field names are unchanged, so routes that reference the constants symbolically continue to work without changes; routes that set or read the headers using the literal "kafka.*" string values must be updated to use the new "CamelKafka*" values. Keeps the bundled transform classes (RegexRouter, TimestampRouter, MessageTimestampRouter, ValueToKey), the KafkaHeaderDeserializer, and the camel-tracing / camel-telemetry KafkaSpanDecorator copies in sync, and regenerates the catalog and endpoint DSL artifacts. The camel-opentelemetry2 SpanKindTest / mock producer, the core ImportantHeaderUtils, and the important-headers.json catalog do not exist on this branch and are not part of this backport. The version-specific upgrade-guide entry is added on the main branch (per the backport upgrade-guide policy), not on this maintenance branch. Tracker: CAMEL-23577 Reported by Claude Code on behalf of Andrea Cosentino Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
davsclaus
approved these changes
May 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of #23602 (CAMEL-23584) to the
camel-4.14.xmaintenance branch.Summary
Renames the Exchange header string values in
KafkaConstantsfrom the non-Camel-prefixedkafka.*namespace to the project-wideCamelKafka*PascalCase convention, completing the camel-kafka sub-task under the CAMEL-23577 umbrella header-naming-convention sweep.PARTITION_KEYkafka.PARTITION_KEYCamelKafkaPartitionKeyPARTITIONkafka.PARTITIONCamelKafkaPartitionKEYkafka.KEYCamelKafkaKeyTOPICkafka.TOPICCamelKafkaTopicOVERRIDE_TOPICkafka.OVERRIDE_TOPICCamelKafkaOverrideTopicOFFSETkafka.OFFSETCamelKafkaOffsetHEADERSkafka.HEADERSCamelKafkaHeadersLAST_RECORD_BEFORE_COMMITkafka.LAST_RECORD_BEFORE_COMMITCamelKafkaLastRecordBeforeCommitLAST_POLL_RECORDkafka.LAST_POLL_RECORDCamelKafkaLastPollRecordTIMESTAMPkafka.TIMESTAMPCamelKafkaTimestampOVERRIDE_TIMESTAMPkafka.OVERRIDE_TIMESTAMPCamelKafkaOverrideTimestampKAFKA_RECORD_METAkafka.RECORD_METACamelKafkaRecordMetaBackwards-compatibility
kafka.*header strings must move to the newCamelKafka*values.kafkaOverrideTopic(), etc.) are unchanged; only the returned string value reflects the new convention.Notes for this backport
KafkaConstantsoncamel-4.14.xdiffers frommain(noimportant=truemetadata flags, different description wording). Only the string values were changed here — the 4.14.x structure is otherwise preserved.KafkaHeaderDeserializer, and thecamel-tracing/camel-telemetryKafkaSpanDecoratorcopies in sync. Regenerates the catalog and endpoint DSL artifacts.camel-opentelemetry2SpanKindTest/ mock producer, the coreImportantHeaderUtils, and theimportant-headers.jsoncatalog do not exist on this branch and are intentionally not part of this backport.Test plan
KafkaProducerTest,RegexRouterTest, transform tests,KafkaHeaderDeserializerTest) — passmvn clean install -DskipTestsfrom root — passes, all downstream generators regenerate cleanlyReported by Claude Code on behalf of Andrea Cosentino