This is an automated email from the ASF dual-hosted git repository.
oscerd pushed a commit to branch camel-4.14.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-4.14.x by this push:
new 63c0a970a611 [backport camel-4.14.x] CAMEL-23510: camel-jgroups -
align Exchange header constant names with Camel naming convention (#23421)
63c0a970a611 is described below
commit 63c0a970a6111b0a571bfdd7b9f02d588a691b6b
Author: Andrea Cosentino <[email protected]>
AuthorDate: Thu May 21 14:52:21 2026 +0200
[backport camel-4.14.x] CAMEL-23510: camel-jgroups - align Exchange header
constant names with Camel naming convention (#23421)
Backport of #23209 to camel-4.14.x.
Rename the Exchange header string values in JGroupsConstants from raw
uppercase (JGROUPS_DEST, JGROUPS_SRC, JGROUPS_CHANNEL_ADDRESS,
JGROUPS_ORIGINAL_MESSAGE) to the Camel naming convention
(CamelJGroupsDest, CamelJGroupsSrc, CamelJGroupsChannelAddress,
CamelJGroupsOriginalMessage). The Java field names are unchanged so
routes referencing the constants symbolically continue to work; routes
using the literal string value must be updated.
The cherry-pick required two adjustments for 4.14.x:
- JGroupsConstants.java preserves the 4.14.x string-concatenation
style (no Java text blocks).
- The upgrade-guide entry is placed in camel-4x-upgrade-guide-4_14.adoc
(the 4_21 file used on main does not exist on this branch). The same
entry is mirrored back to main by #23422.
Regenerates the affected catalog, component metadata, and endpoint DSL.
Closes #23421
---
.../apache/camel/catalog/components/jgroups.json | 8 ++++----
.../apache/camel/component/jgroups/jgroups.json | 8 ++++----
.../camel/component/jgroups/JGroupsConstants.java | 8 ++++----
.../ROOT/pages/camel-4x-upgrade-guide-4_14.adoc | 21 +++++++++++++++++++
.../dsl/JGroupsEndpointBuilderFactory.java | 24 +++++++++++-----------
5 files changed, 45 insertions(+), 24 deletions(-)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/jgroups.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/jgroups.json
index 2f0a912742f3..b017fcd76c30 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/jgroups.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/jgroups.json
@@ -32,10 +32,10 @@
"autowiredEnabled": { "index": 5, "kind": "property", "displayName":
"Autowired Enabled", "group": "advanced", "label": "advanced", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": true, "description":
"Whether autowiring is enabled. This is used for automatic autowiring options
(the option must be marked as autowired) by looking up in the registry to find
if there is a single instance of matching t [...]
},
"headers": {
- "JGROUPS_CHANNEL_ADDRESS": { "index": 0, "kind": "header", "displayName":
"", "group": "common", "label": "", "required": false, "javaType":
"org.jgroups.Address", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "description": "Address (org.jgroups.Address) of the
channel associated with the endpoint.", "constantName":
"org.apache.camel.component.jgroups.JGroupsConstants#HEADER_JGROUPS_CHANNEL_ADDRESS"
},
- "JGROUPS_DEST": { "index": 1, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType":
"org.jgroups.Address", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "description": "Consumer: The org.jgroups.Address
instance extracted by org.jgroups.Message.getDest() method of the consumed
message. Producer: The custom destination org.jgroups.Address of the message to
be sent.", "constantName": "org.apache.camel.comp [...]
- "JGROUPS_SRC": { "index": 2, "kind": "header", "displayName": "", "group":
"common", "label": "", "required": false, "javaType": "org.jgroups.Address",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "Consumer : The org.jgroups.Address instance extracted by
org.jgroups.Message.getSrc() method of the consumed message. Producer: The
custom source org.jgroups.Address of the message to be sent.", "constantName":
"org.apache.camel.component. [...]
- "JGROUPS_ORIGINAL_MESSAGE": { "index": 3, "kind": "header", "displayName":
"", "group": "common", "label": "", "required": false, "javaType":
"org.jgroups.Message", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "description": "The original org.jgroups.Message
instance from which the body of the consumed message has been extracted.",
"constantName":
"org.apache.camel.component.jgroups.JGroupsConstants#HEADER_JGROUPS_ORIGINAL_MESSAGE"
}
+ "CamelJGroupsChannelAddress": { "index": 0, "kind": "header",
"displayName": "", "group": "common", "label": "", "required": false,
"javaType": "org.jgroups.Address", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "description": "Address
(org.jgroups.Address) of the channel associated with the endpoint.",
"constantName":
"org.apache.camel.component.jgroups.JGroupsConstants#HEADER_JGROUPS_CHANNEL_ADDRESS"
},
+ "CamelJGroupsDest": { "index": 1, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType":
"org.jgroups.Address", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "description": "Consumer: The org.jgroups.Address
instance extracted by org.jgroups.Message.getDest() method of the consumed
message. Producer: The custom destination org.jgroups.Address of the message to
be sent.", "constantName": "org.apache.camel. [...]
+ "CamelJGroupsSrc": { "index": 2, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType":
"org.jgroups.Address", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "description": "Consumer : The org.jgroups.Address
instance extracted by org.jgroups.Message.getSrc() method of the consumed
message. Producer: The custom source org.jgroups.Address of the message to be
sent.", "constantName": "org.apache.camel.compon [...]
+ "CamelJGroupsOriginalMessage": { "index": 3, "kind": "header",
"displayName": "", "group": "common", "label": "", "required": false,
"javaType": "org.jgroups.Message", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "description": "The original
org.jgroups.Message instance from which the body of the consumed message has
been extracted.", "constantName":
"org.apache.camel.component.jgroups.JGroupsConstants#HEADER_JGROUPS_ORIGINAL_MESSAGE"
}
},
"properties": {
"clusterName": { "index": 0, "kind": "path", "displayName": "Cluster
Name", "group": "common", "label": "", "required": true, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "description": "The name of the JGroups
cluster the component should connect to." },
diff --git
a/components/camel-jgroups/src/generated/resources/META-INF/org/apache/camel/component/jgroups/jgroups.json
b/components/camel-jgroups/src/generated/resources/META-INF/org/apache/camel/component/jgroups/jgroups.json
index 2f0a912742f3..b017fcd76c30 100644
---
a/components/camel-jgroups/src/generated/resources/META-INF/org/apache/camel/component/jgroups/jgroups.json
+++
b/components/camel-jgroups/src/generated/resources/META-INF/org/apache/camel/component/jgroups/jgroups.json
@@ -32,10 +32,10 @@
"autowiredEnabled": { "index": 5, "kind": "property", "displayName":
"Autowired Enabled", "group": "advanced", "label": "advanced", "required":
false, "type": "boolean", "javaType": "boolean", "deprecated": false,
"autowired": false, "secret": false, "defaultValue": true, "description":
"Whether autowiring is enabled. This is used for automatic autowiring options
(the option must be marked as autowired) by looking up in the registry to find
if there is a single instance of matching t [...]
},
"headers": {
- "JGROUPS_CHANNEL_ADDRESS": { "index": 0, "kind": "header", "displayName":
"", "group": "common", "label": "", "required": false, "javaType":
"org.jgroups.Address", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "description": "Address (org.jgroups.Address) of the
channel associated with the endpoint.", "constantName":
"org.apache.camel.component.jgroups.JGroupsConstants#HEADER_JGROUPS_CHANNEL_ADDRESS"
},
- "JGROUPS_DEST": { "index": 1, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType":
"org.jgroups.Address", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "description": "Consumer: The org.jgroups.Address
instance extracted by org.jgroups.Message.getDest() method of the consumed
message. Producer: The custom destination org.jgroups.Address of the message to
be sent.", "constantName": "org.apache.camel.comp [...]
- "JGROUPS_SRC": { "index": 2, "kind": "header", "displayName": "", "group":
"common", "label": "", "required": false, "javaType": "org.jgroups.Address",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "Consumer : The org.jgroups.Address instance extracted by
org.jgroups.Message.getSrc() method of the consumed message. Producer: The
custom source org.jgroups.Address of the message to be sent.", "constantName":
"org.apache.camel.component. [...]
- "JGROUPS_ORIGINAL_MESSAGE": { "index": 3, "kind": "header", "displayName":
"", "group": "common", "label": "", "required": false, "javaType":
"org.jgroups.Message", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "description": "The original org.jgroups.Message
instance from which the body of the consumed message has been extracted.",
"constantName":
"org.apache.camel.component.jgroups.JGroupsConstants#HEADER_JGROUPS_ORIGINAL_MESSAGE"
}
+ "CamelJGroupsChannelAddress": { "index": 0, "kind": "header",
"displayName": "", "group": "common", "label": "", "required": false,
"javaType": "org.jgroups.Address", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "description": "Address
(org.jgroups.Address) of the channel associated with the endpoint.",
"constantName":
"org.apache.camel.component.jgroups.JGroupsConstants#HEADER_JGROUPS_CHANNEL_ADDRESS"
},
+ "CamelJGroupsDest": { "index": 1, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType":
"org.jgroups.Address", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "description": "Consumer: The org.jgroups.Address
instance extracted by org.jgroups.Message.getDest() method of the consumed
message. Producer: The custom destination org.jgroups.Address of the message to
be sent.", "constantName": "org.apache.camel. [...]
+ "CamelJGroupsSrc": { "index": 2, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType":
"org.jgroups.Address", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "description": "Consumer : The org.jgroups.Address
instance extracted by org.jgroups.Message.getSrc() method of the consumed
message. Producer: The custom source org.jgroups.Address of the message to be
sent.", "constantName": "org.apache.camel.compon [...]
+ "CamelJGroupsOriginalMessage": { "index": 3, "kind": "header",
"displayName": "", "group": "common", "label": "", "required": false,
"javaType": "org.jgroups.Message", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "description": "The original
org.jgroups.Message instance from which the body of the consumed message has
been extracted.", "constantName":
"org.apache.camel.component.jgroups.JGroupsConstants#HEADER_JGROUPS_ORIGINAL_MESSAGE"
}
},
"properties": {
"clusterName": { "index": 0, "kind": "path", "displayName": "Cluster
Name", "group": "common", "label": "", "required": true, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "deprecationNote": "",
"autowired": false, "secret": false, "description": "The name of the JGroups
cluster the component should connect to." },
diff --git
a/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/JGroupsConstants.java
b/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/JGroupsConstants.java
index 9cf875b259ea..072629f550f8 100644
---
a/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/JGroupsConstants.java
+++
b/components/camel-jgroups/src/main/java/org/apache/camel/component/jgroups/JGroupsConstants.java
@@ -23,21 +23,21 @@ public final class JGroupsConstants {
@Metadata(description = "Address (`org.jgroups.Address`) of the channel
associated with the\n" +
"endpoint.",
javaType = "org.jgroups.Address")
- public static final String HEADER_JGROUPS_CHANNEL_ADDRESS =
"JGROUPS_CHANNEL_ADDRESS";
+ public static final String HEADER_JGROUPS_CHANNEL_ADDRESS =
"CamelJGroupsChannelAddress";
@Metadata(description = "*Consumer*: The `org.jgroups.Address` instance
extracted by\n" +
"`org.jgroups.Message`.getDest() method of the
consumed message.\n" +
"*Producer*: The custom destination
`org.jgroups.Address` of the message to be sent.",
javaType = "org.jgroups.Address")
- public static final String HEADER_JGROUPS_DEST = "JGROUPS_DEST";
+ public static final String HEADER_JGROUPS_DEST = "CamelJGroupsDest";
@Metadata(description = "*Consumer* : The `org.jgroups.Address` instance
extracted by\n" +
"`org.jgroups.Message`.getSrc() method of the
consumed message. \n" +
"*Producer*: The custom source
`org.jgroups.Address` of the message to be sent.",
javaType = "org.jgroups.Address")
- public static final String HEADER_JGROUPS_SRC = "JGROUPS_SRC";
+ public static final String HEADER_JGROUPS_SRC = "CamelJGroupsSrc";
@Metadata(description = "The original `org.jgroups.Message` instance from
which the body of the\n" +
"consumed message has been extracted.",
javaType = "org.jgroups.Message")
- public static final String HEADER_JGROUPS_ORIGINAL_MESSAGE =
"JGROUPS_ORIGINAL_MESSAGE";
+ public static final String HEADER_JGROUPS_ORIGINAL_MESSAGE =
"CamelJGroupsOriginalMessage";
private JGroupsConstants() {
diff --git
a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_14.adoc
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_14.adoc
index c9d86be01cd0..954025c9c1dc 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_14.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_14.adoc
@@ -429,3 +429,24 @@ between the transport `from` and the `cxf:` `to`:
The same pattern applies to HTTP-based bridges (`platform-http`/`jetty`/`netty
-http`/`http` -> `cxf:`) and any other transport whose default
`HeaderFilterStrategy` filters `Camel*` headers.
+
+=== camel-jgroups
+
+The Exchange header constants in `JGroupsConstants` have been renamed to follow
+the Camel naming convention used across the rest of the component catalog. The
+Java field names are unchanged; only the header string values have changed:
+
+[options="header"]
+|===
+| Constant | Previous value | New value
+| `JGroupsConstants.HEADER_JGROUPS_CHANNEL_ADDRESS` |
`JGROUPS_CHANNEL_ADDRESS` | `CamelJGroupsChannelAddress`
+| `JGroupsConstants.HEADER_JGROUPS_DEST` | `JGROUPS_DEST` | `CamelJGroupsDest`
+| `JGroupsConstants.HEADER_JGROUPS_SRC` | `JGROUPS_SRC` | `CamelJGroupsSrc`
+| `JGroupsConstants.HEADER_JGROUPS_ORIGINAL_MESSAGE` |
`JGROUPS_ORIGINAL_MESSAGE` | `CamelJGroupsOriginalMessage`
+|===
+
+Routes that reference the constant symbolically (for example
+`setHeader(JGroupsConstants.HEADER_JGROUPS_DEST, ...)`) continue to work
+without changes. Routes that set the header by its literal string value
+(for example `setHeader("JGROUPS_DEST", ...)`) must be updated to use the
+new value (`setHeader("CamelJGroupsDest", ...)`).
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/JGroupsEndpointBuilderFactory.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/JGroupsEndpointBuilderFactory.java
index d4656526200a..aea6a7d318aa 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/JGroupsEndpointBuilderFactory.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/JGroupsEndpointBuilderFactory.java
@@ -420,10 +420,10 @@ public interface JGroupsEndpointBuilderFactory {
*
* Group: common
*
- * @return the name of the header {@code JGROUPS_CHANNEL_ADDRESS}.
+ * @return the name of the header {@code JGroupsChannelAddress}.
*/
- public String jgroupsChannelAddress() {
- return "JGROUPS_CHANNEL_ADDRESS";
+ public String jGroupsChannelAddress() {
+ return "CamelJGroupsChannelAddress";
}
/**
* Consumer: The org.jgroups.Address instance extracted by
@@ -435,10 +435,10 @@ public interface JGroupsEndpointBuilderFactory {
*
* Group: common
*
- * @return the name of the header {@code JGROUPS_DEST}.
+ * @return the name of the header {@code JGroupsDest}.
*/
- public String jgroupsDest() {
- return "JGROUPS_DEST";
+ public String jGroupsDest() {
+ return "CamelJGroupsDest";
}
/**
* Consumer : The org.jgroups.Address instance extracted by
@@ -450,10 +450,10 @@ public interface JGroupsEndpointBuilderFactory {
*
* Group: common
*
- * @return the name of the header {@code JGROUPS_SRC}.
+ * @return the name of the header {@code JGroupsSrc}.
*/
- public String jgroupsSrc() {
- return "JGROUPS_SRC";
+ public String jGroupsSrc() {
+ return "CamelJGroupsSrc";
}
/**
* The original org.jgroups.Message instance from which the body of the
@@ -463,10 +463,10 @@ public interface JGroupsEndpointBuilderFactory {
*
* Group: common
*
- * @return the name of the header {@code JGROUPS_ORIGINAL_MESSAGE}.
+ * @return the name of the header {@code JGroupsOriginalMessage}.
*/
- public String jgroupsOriginalMessage() {
- return "JGROUPS_ORIGINAL_MESSAGE";
+ public String jGroupsOriginalMessage() {
+ return "CamelJGroupsOriginalMessage";
}
}
static JGroupsEndpointBuilder endpointBuilder(String componentName, String
path) {