You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "oscerd (via GitHub)" <gi...@apache.org> on 2026/05/29 09:17:01 UTC

[PR] [backport camel-4.14.x] CAMEL-23584: camel-kafka - align Exchange header constant names with Camel naming convention [camel]

oscerd opened a new pull request, #23632:
URL: https://github.com/apache/camel/pull/23632

   Backport of #23602 (CAMEL-23584) to the `camel-4.14.x` maintenance branch.
   
   ## Summary
   
   Renames the Exchange header string values in `KafkaConstants` from the non-Camel-prefixed `kafka.*` namespace to the project-wide `CamelKafka*` PascalCase convention, completing the camel-kafka sub-task under the [CAMEL-23577](https://issues.apache.org/jira/browse/CAMEL-23577) umbrella header-naming-convention sweep.
   
   | Constant | Previous value | New value |
   |----------|---------------|-----------|
   | `PARTITION_KEY` | `kafka.PARTITION_KEY` | `CamelKafkaPartitionKey` |
   | `PARTITION` | `kafka.PARTITION` | `CamelKafkaPartition` |
   | `KEY` | `kafka.KEY` | `CamelKafkaKey` |
   | `TOPIC` | `kafka.TOPIC` | `CamelKafkaTopic` |
   | `OVERRIDE_TOPIC` | `kafka.OVERRIDE_TOPIC` | `CamelKafkaOverrideTopic` |
   | `OFFSET` | `kafka.OFFSET` | `CamelKafkaOffset` |
   | `HEADERS` | `kafka.HEADERS` | `CamelKafkaHeaders` |
   | `LAST_RECORD_BEFORE_COMMIT` | `kafka.LAST_RECORD_BEFORE_COMMIT` | `CamelKafkaLastRecordBeforeCommit` |
   | `LAST_POLL_RECORD` | `kafka.LAST_POLL_RECORD` | `CamelKafkaLastPollRecord` |
   | `TIMESTAMP` | `kafka.TIMESTAMP` | `CamelKafkaTimestamp` |
   | `OVERRIDE_TIMESTAMP` | `kafka.OVERRIDE_TIMESTAMP` | `CamelKafkaOverrideTimestamp` |
   | `KAFKA_RECORD_META` | `kafka.RECORD_META` | `CamelKafkaRecordMeta` |
   
   ## Backwards-compatibility
   
   - Java field names are unchanged → routes using the symbolic constants are unaffected.
   - Routes hard-coding the literal `kafka.*` header strings must move to the new `CamelKafka*` values.
   - The Endpoint DSL header accessor **method names** (`kafkaOverrideTopic()`, etc.) are unchanged; only the returned string value reflects the new convention.
   
   ## Notes for this backport
   
   - `KafkaConstants` on `camel-4.14.x` differs from `main` (no `important=true` metadata flags, different description wording). Only the **string values** were changed here — the 4.14.x structure is otherwise preserved.
   - The version-specific upgrade-guide entry is added on the **main** branch (per the backport upgrade-guide policy), **not** on this maintenance branch.
   - Keeps the bundled transform classes, `KafkaHeaderDeserializer`, and the `camel-tracing` / `camel-telemetry` `KafkaSpanDecorator` copies in sync. 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 intentionally not part of this backport.
   
   ## Test plan
   
   - [x] camel-kafka unit tests (`KafkaProducerTest`, `RegexRouterTest`, transform tests, `KafkaHeaderDeserializerTest`) — pass
   - [x] Full reactor `mvn clean install -DskipTests` from root — passes, all downstream generators regenerate cleanly
   
   _Reported by Claude Code on behalf of Andrea Cosentino_


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [PR] [backport camel-4.14.x] CAMEL-23584: camel-kafka - align Exchange header constant names with Camel naming convention [camel]

Posted by "oscerd (via GitHub)" <gi...@apache.org>.
oscerd merged PR #23632:
URL: https://github.com/apache/camel/pull/23632


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org