Skip to content

CAMEL-23587: camel-jt400 - align Exchange header constant names with Camel naming convention#23470

Merged
oscerd merged 1 commit into
apache:mainfrom
oscerd:fix/CAMEL-23587
May 22, 2026
Merged

CAMEL-23587: camel-jt400 - align Exchange header constant names with Camel naming convention#23470
oscerd merged 1 commit into
apache:mainfrom
oscerd:fix/CAMEL-23587

Conversation

@oscerd
Copy link
Copy Markdown
Contributor

@oscerd oscerd commented May 22, 2026

Summary

Renames the two Exchange header string values in Jt400Constants that were
not in the Camel namespace (and therefore not filtered by the default
HeaderFilterStrategy) to CamelJt400<Name>, following the convention used
across the rest of the Camel component catalog and matching the pattern
established in CAMEL-23526 (camel-cxf), CAMEL-23522 (camel-mail),
CAMEL-23461 (camel-aws-bedrock), CAMEL-23532 (camel-vertx-websocket /
camel-atmosphere-websocket / camel-iggy), and CAMEL-23576 (camel-jira).

Constant Previous value New value
Jt400Constants.KEY KEY CamelJt400Key
Jt400Constants.SENDER_INFORMATION SENDER_INFORMATION CamelJt400SenderInformation

Jt400Constants.KEY is the data-queue key used for keyed-data-queue read and
write operations (the header called out in the CAMEL-23577 sweep);
SENDER_INFORMATION is included because it was the only other unprefixed
constant in the class.

The Java field names are unchanged so routes referencing the constants
symbolically continue to work; routes using the literal string values must be
updated (documented in the 4.21 upgrade guide).

Already-compliant constants left unchanged

MESSAGE, MESSAGE_ID, MESSAGE_FILE, MESSAGE_TYPE, MESSAGE_SEVERITY,
MESSAGE_DFT_RPY, and MESSAGE_REPLYTO_KEY were already Camel-prefixed.

Generated artifacts

  • components/camel-jt400/.../jt400.json + catalog mirror
  • dsl/camel-endpointdsl/.../Jt400EndpointBuilderFactory.java — DSL header
    accessors renamed (kEY()jt400Key(),
    senderInformation()jt400SenderInformation())

Backports

camel-jt400 exists on camel-4.18.x and camel-4.14.x with the same legacy
values — backports apply and will be filed as follow-up PRs.

Test plan

  • mvn test in components/camel-jt400 — 34 tests pass (2 skipped)
  • Module + catalog + endpointdsl built cleanly; only camel-jt400 regen
    artifacts included
  • Tests use symbolic constant references, so no test changes needed
  • Upgrade guide entry added under === camel-jt400

Tracker: CAMEL-23577

Reported by Claude Code on behalf of Andrea Cosentino

@oscerd oscerd requested review from davsclaus and gnodet May 22, 2026 09:44
Copy link
Copy Markdown
Contributor

@gnodet gnodet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Clean, straightforward header rename following the same pattern as the other PRs in this series (camel-jira, camel-cxf, camel-mail, etc.).

The change itself is correct:

  • The two remaining unprefixed constants (KEY -> CamelJt400Key, SENDER_INFORMATION -> CamelJt400SenderInformation) now follow the CamelJt400* convention that the other constants in the class already use.
  • Java field names are unchanged, so symbolic references continue to work.
  • The Jt400Endpoint.KEY and Jt400Endpoint.SENDER_INFORMATION re-exported constants automatically pick up the new values via delegation to Jt400Constants.
  • Generated artifacts (catalog JSON, endpoint DSL) are consistent.
  • Upgrade guide entry is well-written and clearly documents the change.

One minor observation (non-blocking): the Javadoc <li> items in Jt400DataQueueConsumer.java (line ~99-100) and Jt400MsgQueueConsumer.java (line ~87) still reference the old header names as literal strings in their <ul> lists (e.g., <li>SENDER_INFORMATION: ..., <li>KEY: ...). These are internal Javadoc and not part of the public-facing docs, so it is not critical, but updating them to match the new values would keep things consistent. The other entries in the same Javadoc lists (e.g., jt400.MESSAGE_ID) also use a different prefix convention, so the whole block could use a refresh at some point.

Claude Code on behalf of Guillaume Nodet

@github-actions
Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 22, 2026

🧪 CI tested the following changed modules:

  • catalog/camel-catalog
  • components/camel-jt400
  • docs
  • dsl/camel-endpointdsl
All tested modules (10 modules)
  • Camel :: Catalog :: Camel Catalog
  • Camel :: Endpoint DSL
  • Camel :: JBang :: MCP
  • Camel :: JBang :: Plugin :: Route Parser
  • Camel :: JBang :: Plugin :: TUI
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: Java Toolbox for IBM i
  • Camel :: Launcher :: Container
  • Camel :: YAML DSL :: Validator
  • Camel :: YAML DSL :: Validator Maven Plugin

⚙️ View full build and test results

…Camel naming convention

Renames the two Exchange header string values in Jt400Constants that were not
in the Camel namespace (KEY, SENDER_INFORMATION) to CamelJt400<Name>,
following the convention used across the rest of the Camel component catalog
and matching the pattern established in CAMEL-23526 (camel-cxf), CAMEL-23522
(camel-mail), CAMEL-23461 (camel-aws-bedrock), CAMEL-23532
(camel-vertx-websocket / camel-atmosphere-websocket / camel-iggy), and
CAMEL-23576 (camel-jira).

- KEY: "KEY" -> "CamelJt400Key" (data-queue key for keyed-data-queue read/write)
- SENDER_INFORMATION: "SENDER_INFORMATION" -> "CamelJt400SenderInformation"

The Java field names are unchanged so routes referencing the constants
symbolically continue to work; routes using the literal string values must be
updated (documented in the 4.21 upgrade guide). The remaining constants
(MESSAGE, MESSAGE_ID, MESSAGE_FILE, MESSAGE_TYPE, MESSAGE_SEVERITY,
MESSAGE_DFT_RPY, MESSAGE_REPLYTO_KEY) were already Camel-prefixed and are
unchanged.

The generated Endpoint DSL header accessors on Jt400HeaderNameBuilder have
been renamed: kEY() -> jt400Key() and senderInformation() ->
jt400SenderInformation().

All existing tests use symbolic constant references and continue to pass.

Tracker: CAMEL-23577

Reported by Claude Code on behalf of Andrea Cosentino

Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants