From c66faee94ddf25fc32e1d162753d118c76ae6dc7 Mon Sep 17 00:00:00 2001 From: Andrea Cosentino Date: Fri, 22 May 2026 18:34:27 +0200 Subject: [PATCH] CAMEL-23587: camel-jt400 - align Exchange header constant names with Camel naming convention (#23470) Renames the two Exchange header string values in Jt400Constants that were not in the Camel namespace (KEY, SENDER_INFORMATION) to CamelJt400, 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 --- .../camel/catalog/components/jt400.json | 4 +-- .../apache/camel/component/jt400/jt400.json | 4 +-- .../camel/component/jt400/Jt400Constants.java | 4 +-- .../pages/camel-4x-upgrade-guide-4_18.adoc | 32 +++++++++++++++++++ .../dsl/Jt400EndpointBuilderFactory.java | 12 +++---- 5 files changed, 44 insertions(+), 12 deletions(-) diff --git a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/jt400.json b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/jt400.json index 5fbd03473deb7..98358baf0f1ef 100644 --- a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/jt400.json +++ b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/jt400.json @@ -32,8 +32,8 @@ "healthCheckProducerEnabled": { "index": 5, "kind": "property", "displayName": "Health Check Producer Enabled", "group": "health", "label": "health", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Used for enabling or disabling all producer based health checks from this component. Notice: Camel has by default disabled all producer based health-checks. You can turn on producer checks globally by setting camel.health.producersEnabled=true." } }, "headers": { - "SENDER_INFORMATION": { "index": 0, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Data queues: Returns the sender information for this data queue entry, or an empty string if not available.Message queues: The job identifier of the sending job", "constantName": "org.apache.camel.component.jt400.Jt400Constants#SENDER_INFORMATION" }, - "KEY": { "index": 1, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String or byte[]", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The data queue key.", "constantName": "org.apache.camel.component.jt400.Jt400Constants#KEY" }, + "CamelJt400SenderInformation": { "index": 0, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Data queues: Returns the sender information for this data queue entry, or an empty string if not available.Message queues: The job identifier of the sending job", "constantName": "org.apache.camel.component.jt400.Jt400Constants#SENDER_INFORMATION" }, + "CamelJt400Key": { "index": 1, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String or byte[]", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The data queue key.", "constantName": "org.apache.camel.component.jt400.Jt400Constants#KEY" }, "CamelJt400Message": { "index": 2, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "com.ibm.as400.access.QueuedMessage", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message received", "constantName": "org.apache.camel.component.jt400.Jt400Constants#MESSAGE" }, "CamelJt400MessageID": { "index": 3, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message identifier", "constantName": "org.apache.camel.component.jt400.Jt400Constants#MESSAGE_ID" }, "CamelJt400MessageFile": { "index": 4, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message file name", "constantName": "org.apache.camel.component.jt400.Jt400Constants#MESSAGE_FILE" }, diff --git a/components/camel-jt400/src/generated/resources/META-INF/org/apache/camel/component/jt400/jt400.json b/components/camel-jt400/src/generated/resources/META-INF/org/apache/camel/component/jt400/jt400.json index 5fbd03473deb7..98358baf0f1ef 100644 --- a/components/camel-jt400/src/generated/resources/META-INF/org/apache/camel/component/jt400/jt400.json +++ b/components/camel-jt400/src/generated/resources/META-INF/org/apache/camel/component/jt400/jt400.json @@ -32,8 +32,8 @@ "healthCheckProducerEnabled": { "index": 5, "kind": "property", "displayName": "Health Check Producer Enabled", "group": "health", "label": "health", "required": false, "type": "boolean", "javaType": "boolean", "deprecated": false, "autowired": false, "secret": false, "defaultValue": true, "description": "Used for enabling or disabling all producer based health checks from this component. Notice: Camel has by default disabled all producer based health-checks. You can turn on producer checks globally by setting camel.health.producersEnabled=true." } }, "headers": { - "SENDER_INFORMATION": { "index": 0, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Data queues: Returns the sender information for this data queue entry, or an empty string if not available.Message queues: The job identifier of the sending job", "constantName": "org.apache.camel.component.jt400.Jt400Constants#SENDER_INFORMATION" }, - "KEY": { "index": 1, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String or byte[]", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The data queue key.", "constantName": "org.apache.camel.component.jt400.Jt400Constants#KEY" }, + "CamelJt400SenderInformation": { "index": 0, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "Data queues: Returns the sender information for this data queue entry, or an empty string if not available.Message queues: The job identifier of the sending job", "constantName": "org.apache.camel.component.jt400.Jt400Constants#SENDER_INFORMATION" }, + "CamelJt400Key": { "index": 1, "kind": "header", "displayName": "", "group": "common", "label": "", "required": false, "javaType": "String or byte[]", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The data queue key.", "constantName": "org.apache.camel.component.jt400.Jt400Constants#KEY" }, "CamelJt400Message": { "index": 2, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "com.ibm.as400.access.QueuedMessage", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message received", "constantName": "org.apache.camel.component.jt400.Jt400Constants#MESSAGE" }, "CamelJt400MessageID": { "index": 3, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message identifier", "constantName": "org.apache.camel.component.jt400.Jt400Constants#MESSAGE_ID" }, "CamelJt400MessageFile": { "index": 4, "kind": "header", "displayName": "", "group": "consumer", "label": "consumer", "required": false, "javaType": "String", "deprecated": false, "deprecationNote": "", "autowired": false, "secret": false, "description": "The message file name", "constantName": "org.apache.camel.component.jt400.Jt400Constants#MESSAGE_FILE" }, diff --git a/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400Constants.java b/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400Constants.java index 475945ee44ffe..13ace959086be 100755 --- a/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400Constants.java +++ b/components/camel-jt400/src/main/java/org/apache/camel/component/jt400/Jt400Constants.java @@ -26,11 +26,11 @@ public interface Jt400Constants { + "*Message queues: The job identifier of the sending job", javaType = "String") - String SENDER_INFORMATION = "SENDER_INFORMATION"; + String SENDER_INFORMATION = "CamelJt400SenderInformation"; // Used only for keyed data queue support @Metadata(description = "The data queue key.", javaType = "String or byte[]") - String KEY = "KEY"; + String KEY = "CamelJt400Key"; // Used only for message queue support @Metadata(label = "consumer", description = "The message received", javaType = "com.ibm.as400.access.QueuedMessage") diff --git a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_18.adoc b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_18.adoc index 0b7e8b942424f..491aa45edd4d7 100644 --- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_18.adoc +++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_18.adoc @@ -289,6 +289,38 @@ As a consequence, the generated Endpoint DSL header accessors on `resultClassType()` -> `arangoDbResultClassType()`. +=== camel-jt400 - potential breaking change + +The two Exchange header constants in `Jt400Constants` that were not in the +`Camel` namespace (and therefore not filtered by the default +`HeaderFilterStrategy`) have been renamed to follow the Camel naming +convention. The Java field names are unchanged; only the header string values +have changed: + +[options="header"] +|=== +| 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 remaining constants (`MESSAGE`, `MESSAGE_ID`, +`MESSAGE_FILE`, `MESSAGE_TYPE`, `MESSAGE_SEVERITY`, `MESSAGE_DFT_RPY`, +`MESSAGE_REPLYTO_KEY`) were already `Camel`-prefixed and are unchanged. + +Routes that reference the constants symbolically (for example +`setHeader(Jt400Constants.KEY, ...)`) continue to work without changes. Routes +that set the header by its literal string value (for example +`setHeader("KEY", ...)`) must be updated to use the new value +(`setHeader("CamelJt400Key", ...)`). + +As a consequence, the generated Endpoint DSL header accessors on +`Jt400HeaderNameBuilder` have been renamed: `kEY()` -> `jt400Key()` and +`senderInformation()` -> `jt400SenderInformation()`. + + + === camel-web3j - potential breaking change The Exchange header constants in `Web3jConstants` have been renamed to follow the diff --git a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Jt400EndpointBuilderFactory.java b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Jt400EndpointBuilderFactory.java index 3efe4f6957eb4..d8cab7279a4d1 100644 --- a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Jt400EndpointBuilderFactory.java +++ b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/Jt400EndpointBuilderFactory.java @@ -1648,10 +1648,10 @@ public static class Jt400HeaderNameBuilder { * * Group: consumer * - * @return the name of the header {@code SENDER_INFORMATION}. + * @return the name of the header {@code Jt400SenderInformation}. */ - public String senderInformation() { - return "SENDER_INFORMATION"; + public String jt400SenderInformation() { + return "CamelJt400SenderInformation"; } /** * The data queue key. @@ -1660,10 +1660,10 @@ public String senderInformation() { * * Group: common * - * @return the name of the header {@code KEY}. + * @return the name of the header {@code Jt400Key}. */ - public String kEY() { - return "KEY"; + public String jt400Key() { + return "CamelJt400Key"; } /** * The message received.