This is an automated email from the ASF dual-hosted git repository.
oscerd pushed a commit to branch camel-4.18.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-4.18.x by this push:
new 2959633a6dd5 [backport camel-4.18.x] CAMEL-23629: camel-irc - align
Exchange header constant names with Camel naming convention
2959633a6dd5 is described below
commit 2959633a6dd51a9736a9efaedaa843548fcd2d3e
Author: Andrea Cosentino <[email protected]>
AuthorDate: Fri May 29 09:31:50 2026 +0200
[backport camel-4.18.x] CAMEL-23629: camel-irc - align Exchange header
constant names with Camel naming convention
Backport of #23594. Rename the Exchange header string values in IrcConstants
from the non-Camel-prefixed "irc.*" namespace to the project-wide
"CamelIrc*"
PascalCase convention, keeping the Java field names unchanged so symbolic
references keep working. Part of the CAMEL-23577 header-naming sweep.
Updates
the integration tests, component docs and setNamesOnJoin Javadoc,
regenerates
the camel-catalog and endpoint DSL artifacts, and adds a 4.18 upgrade-guide
"potential breaking change" entry.
Closes #23616
---
.../org/apache/camel/catalog/components/irc.json | 22 ++++-----
.../org/apache/camel/component/irc/irc.json | 22 ++++-----
.../camel-irc/src/main/docs/irc-component.adoc | 8 ++--
.../camel/component/irc/IrcConfiguration.java | 2 +-
.../apache/camel/component/irc/IrcConstants.java | 20 ++++----
.../component/irc/it/IrcMultiChannelRouteIT.java | 4 +-
.../camel/component/irc/it/IrcPrivmsgIT.java | 4 +-
.../camel/component/irc/it/IrcsListUsersIT.java | 5 +-
.../ROOT/pages/camel-4x-upgrade-guide-4_18.adoc | 53 ++++++++++++++++++++
.../endpoint/dsl/IrcEndpointBuilderFactory.java | 56 +++++++++++-----------
10 files changed, 125 insertions(+), 71 deletions(-)
diff --git
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/irc.json
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/irc.json
index b83ce4971eb3..d0cc2c7e152d 100644
---
a/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/irc.json
+++
b/catalog/camel-catalog/src/generated/resources/org/apache/camel/catalog/components/irc.json
@@ -31,16 +31,16 @@
"useGlobalSslContextParameters": { "index": 3, "kind": "property",
"displayName": "Use Global Ssl Context Parameters", "group": "security",
"label": "security", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Enable usage of global SSL context
parameters." }
},
"headers": {
- "irc.messageType": { "index": 0, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The type of message", "constantName":
"org.apache.camel.component.irc.IrcConstants#IRC_MESSAGE_TYPE" },
- "irc.target": { "index": 1, "kind": "header", "displayName": "", "group":
"common", "label": "", "required": false, "javaType": "String", "deprecated":
false, "deprecationNote": "", "autowired": false, "secret": false,
"description": "The target", "constantName":
"org.apache.camel.component.irc.IrcConstants#IRC_TARGET" },
- "irc.sendTo": { "index": 2, "kind": "header", "displayName": "", "group":
"common", "label": "", "required": false, "javaType": "String", "deprecated":
false, "deprecationNote": "", "autowired": false, "secret": false,
"description": "The nickname or channel the message should be sent to.",
"constantName": "org.apache.camel.component.irc.IrcConstants#IRC_SEND_TO" },
- "irc.user.kicked": { "index": 3, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The nickname of the user who is kicked from a channel
(passive).", "constantName":
"org.apache.camel.component.irc.IrcConstants#IRC_USER_KICKED" },
- "irc.user.host": { "index": 4, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The host of the person who sent the line.",
"constantName": "org.apache.camel.component.irc.IrcConstants#IRC_USER_HOST" },
- "irc.user.nick": { "index": 5, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The nickname of the person who sent the line or the
server name of the server which sent the line.", "constantName":
"org.apache.camel.component.irc.IrcConstants#IRC_USER_NICK" },
- "irc.user.servername": { "index": 6, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The server name of the server which sent the line or the
nickname of the person who sent the line.", "constantName":
"org.apache.camel.component.irc.IrcConstants#IRC_USER_SERVERNAME" },
- "irc.user.username": { "index": 7, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The username of the person who sent the line.",
"constantName": "org.apache.camel.component.irc.IrcConstants#IRC_USER_USERNAME"
},
- "irc.num": { "index": 8, "kind": "header", "displayName": "", "group":
"common", "label": "", "required": false, "javaType": "int", "deprecated":
false, "deprecationNote": "", "autowired": false, "secret": false,
"description": "The numeric reply.", "constantName":
"org.apache.camel.component.irc.IrcConstants#IRC_NUM" },
- "irc.value": { "index": 9, "kind": "header", "displayName": "", "group":
"common", "label": "", "required": false, "javaType": "String", "deprecated":
false, "deprecationNote": "", "autowired": false, "secret": false,
"description": "The first part of the message", "constantName":
"org.apache.camel.component.irc.IrcConstants#IRC_VALUE" }
+ "CamelIrcMessageType": { "index": 0, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The type of message", "constantName":
"org.apache.camel.component.irc.IrcConstants#IRC_MESSAGE_TYPE" },
+ "CamelIrcTarget": { "index": 1, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The target", "constantName":
"org.apache.camel.component.irc.IrcConstants#IRC_TARGET" },
+ "CamelIrcSendTo": { "index": 2, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The nickname or channel the message should be sent to.",
"constantName": "org.apache.camel.component.irc.IrcConstants#IRC_SEND_TO" },
+ "CamelIrcUserKicked": { "index": 3, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The nickname of the user who is kicked from a channel
(passive).", "constantName":
"org.apache.camel.component.irc.IrcConstants#IRC_USER_KICKED" },
+ "CamelIrcUserHost": { "index": 4, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The host of the person who sent the line.",
"constantName": "org.apache.camel.component.irc.IrcConstants#IRC_USER_HOST" },
+ "CamelIrcUserNick": { "index": 5, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The nickname of the person who sent the line or the
server name of the server which sent the line.", "constantName":
"org.apache.camel.component.irc.IrcConstants#IRC_USER_NICK" },
+ "CamelIrcUserServername": { "index": 6, "kind": "header", "displayName":
"", "group": "common", "label": "", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The server name of the server which sent the line or the
nickname of the person who sent the line.", "constantName":
"org.apache.camel.component.irc.IrcConstants#IRC_USER_SERVERNAME" },
+ "CamelIrcUserUsername": { "index": 7, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The username of the person who sent the line.",
"constantName": "org.apache.camel.component.irc.IrcConstants#IRC_USER_USERNAME"
},
+ "CamelIrcNum": { "index": 8, "kind": "header", "displayName": "", "group":
"common", "label": "", "required": false, "javaType": "int", "deprecated":
false, "deprecationNote": "", "autowired": false, "secret": false,
"description": "The numeric reply.", "constantName":
"org.apache.camel.component.irc.IrcConstants#IRC_NUM" },
+ "CamelIrcValue": { "index": 9, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The first part of the message", "constantName":
"org.apache.camel.component.irc.IrcConstants#IRC_VALUE" }
},
"properties": {
"hostname": { "index": 0, "kind": "path", "displayName": "Hostname",
"group": "common", "label": "", "required": true, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.irc.IrcConfiguration", "configurationField":
"configuration", "description": "Hostname for the IRC chat server" },
@@ -49,7 +49,7 @@
"channels": { "index": 3, "kind": "parameter", "displayName": "Channels",
"group": "common", "label": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.irc.IrcConfiguration", "configurationField":
"configuration", "description": "Comma separated list of IRC channels." },
"commandTimeout": { "index": 4, "kind": "parameter", "displayName":
"Command Timeout", "group": "common", "label": "", "required": false, "type":
"integer", "javaType": "long", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": 5000, "configurationClass":
"org.apache.camel.component.irc.IrcConfiguration", "configurationField":
"configuration", "description": "Delay in milliseconds before sending commands
after the connection is established." },
"keys": { "index": 5, "kind": "parameter", "displayName": "Keys", "group":
"common", "label": "common", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"configurationClass": "org.apache.camel.component.irc.IrcConfiguration",
"configurationField": "configuration", "description": "Comma separated list of
keys for channels." },
- "namesOnJoin": { "index": 6, "kind": "parameter", "displayName": "Names On
Join", "group": "common", "label": "common", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": false, "configurationClass":
"org.apache.camel.component.irc.IrcConfiguration", "configurationField":
"configuration", "description": "Sends NAMES command to channel after joining
it. onReply has to be true in order to process the re [...]
+ "namesOnJoin": { "index": 6, "kind": "parameter", "displayName": "Names On
Join", "group": "common", "label": "common", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": false, "configurationClass":
"org.apache.camel.component.irc.IrcConfiguration", "configurationField":
"configuration", "description": "Sends NAMES command to channel after joining
it. onReply has to be true in order to process the re [...]
"nickname": { "index": 7, "kind": "parameter", "displayName": "Nickname",
"group": "common", "label": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.irc.IrcConfiguration", "configurationField":
"configuration", "description": "The nickname used in chat." },
"persistent": { "index": 8, "kind": "parameter", "displayName":
"Persistent", "group": "common", "label": "", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": true, "autowired": false,
"secret": false, "defaultValue": true, "configurationClass":
"org.apache.camel.component.irc.IrcConfiguration", "configurationField":
"configuration", "description": "Use persistent messages." },
"realname": { "index": 9, "kind": "parameter", "displayName": "Realname",
"group": "common", "label": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.irc.IrcConfiguration", "configurationField":
"configuration", "description": "The IRC user's actual name." },
diff --git
a/components/camel-irc/src/generated/resources/META-INF/org/apache/camel/component/irc/irc.json
b/components/camel-irc/src/generated/resources/META-INF/org/apache/camel/component/irc/irc.json
index b83ce4971eb3..d0cc2c7e152d 100644
---
a/components/camel-irc/src/generated/resources/META-INF/org/apache/camel/component/irc/irc.json
+++
b/components/camel-irc/src/generated/resources/META-INF/org/apache/camel/component/irc/irc.json
@@ -31,16 +31,16 @@
"useGlobalSslContextParameters": { "index": 3, "kind": "property",
"displayName": "Use Global Ssl Context Parameters", "group": "security",
"label": "security", "required": false, "type": "boolean", "javaType":
"boolean", "deprecated": false, "autowired": false, "secret": false,
"defaultValue": false, "description": "Enable usage of global SSL context
parameters." }
},
"headers": {
- "irc.messageType": { "index": 0, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The type of message", "constantName":
"org.apache.camel.component.irc.IrcConstants#IRC_MESSAGE_TYPE" },
- "irc.target": { "index": 1, "kind": "header", "displayName": "", "group":
"common", "label": "", "required": false, "javaType": "String", "deprecated":
false, "deprecationNote": "", "autowired": false, "secret": false,
"description": "The target", "constantName":
"org.apache.camel.component.irc.IrcConstants#IRC_TARGET" },
- "irc.sendTo": { "index": 2, "kind": "header", "displayName": "", "group":
"common", "label": "", "required": false, "javaType": "String", "deprecated":
false, "deprecationNote": "", "autowired": false, "secret": false,
"description": "The nickname or channel the message should be sent to.",
"constantName": "org.apache.camel.component.irc.IrcConstants#IRC_SEND_TO" },
- "irc.user.kicked": { "index": 3, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The nickname of the user who is kicked from a channel
(passive).", "constantName":
"org.apache.camel.component.irc.IrcConstants#IRC_USER_KICKED" },
- "irc.user.host": { "index": 4, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The host of the person who sent the line.",
"constantName": "org.apache.camel.component.irc.IrcConstants#IRC_USER_HOST" },
- "irc.user.nick": { "index": 5, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The nickname of the person who sent the line or the
server name of the server which sent the line.", "constantName":
"org.apache.camel.component.irc.IrcConstants#IRC_USER_NICK" },
- "irc.user.servername": { "index": 6, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The server name of the server which sent the line or the
nickname of the person who sent the line.", "constantName":
"org.apache.camel.component.irc.IrcConstants#IRC_USER_SERVERNAME" },
- "irc.user.username": { "index": 7, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The username of the person who sent the line.",
"constantName": "org.apache.camel.component.irc.IrcConstants#IRC_USER_USERNAME"
},
- "irc.num": { "index": 8, "kind": "header", "displayName": "", "group":
"common", "label": "", "required": false, "javaType": "int", "deprecated":
false, "deprecationNote": "", "autowired": false, "secret": false,
"description": "The numeric reply.", "constantName":
"org.apache.camel.component.irc.IrcConstants#IRC_NUM" },
- "irc.value": { "index": 9, "kind": "header", "displayName": "", "group":
"common", "label": "", "required": false, "javaType": "String", "deprecated":
false, "deprecationNote": "", "autowired": false, "secret": false,
"description": "The first part of the message", "constantName":
"org.apache.camel.component.irc.IrcConstants#IRC_VALUE" }
+ "CamelIrcMessageType": { "index": 0, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The type of message", "constantName":
"org.apache.camel.component.irc.IrcConstants#IRC_MESSAGE_TYPE" },
+ "CamelIrcTarget": { "index": 1, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The target", "constantName":
"org.apache.camel.component.irc.IrcConstants#IRC_TARGET" },
+ "CamelIrcSendTo": { "index": 2, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The nickname or channel the message should be sent to.",
"constantName": "org.apache.camel.component.irc.IrcConstants#IRC_SEND_TO" },
+ "CamelIrcUserKicked": { "index": 3, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The nickname of the user who is kicked from a channel
(passive).", "constantName":
"org.apache.camel.component.irc.IrcConstants#IRC_USER_KICKED" },
+ "CamelIrcUserHost": { "index": 4, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The host of the person who sent the line.",
"constantName": "org.apache.camel.component.irc.IrcConstants#IRC_USER_HOST" },
+ "CamelIrcUserNick": { "index": 5, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The nickname of the person who sent the line or the
server name of the server which sent the line.", "constantName":
"org.apache.camel.component.irc.IrcConstants#IRC_USER_NICK" },
+ "CamelIrcUserServername": { "index": 6, "kind": "header", "displayName":
"", "group": "common", "label": "", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The server name of the server which sent the line or the
nickname of the person who sent the line.", "constantName":
"org.apache.camel.component.irc.IrcConstants#IRC_USER_SERVERNAME" },
+ "CamelIrcUserUsername": { "index": 7, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The username of the person who sent the line.",
"constantName": "org.apache.camel.component.irc.IrcConstants#IRC_USER_USERNAME"
},
+ "CamelIrcNum": { "index": 8, "kind": "header", "displayName": "", "group":
"common", "label": "", "required": false, "javaType": "int", "deprecated":
false, "deprecationNote": "", "autowired": false, "secret": false,
"description": "The numeric reply.", "constantName":
"org.apache.camel.component.irc.IrcConstants#IRC_NUM" },
+ "CamelIrcValue": { "index": 9, "kind": "header", "displayName": "",
"group": "common", "label": "", "required": false, "javaType": "String",
"deprecated": false, "deprecationNote": "", "autowired": false, "secret":
false, "description": "The first part of the message", "constantName":
"org.apache.camel.component.irc.IrcConstants#IRC_VALUE" }
},
"properties": {
"hostname": { "index": 0, "kind": "path", "displayName": "Hostname",
"group": "common", "label": "", "required": true, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "deprecationNote": "", "autowired":
false, "secret": false, "configurationClass":
"org.apache.camel.component.irc.IrcConfiguration", "configurationField":
"configuration", "description": "Hostname for the IRC chat server" },
@@ -49,7 +49,7 @@
"channels": { "index": 3, "kind": "parameter", "displayName": "Channels",
"group": "common", "label": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.irc.IrcConfiguration", "configurationField":
"configuration", "description": "Comma separated list of IRC channels." },
"commandTimeout": { "index": 4, "kind": "parameter", "displayName":
"Command Timeout", "group": "common", "label": "", "required": false, "type":
"integer", "javaType": "long", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": 5000, "configurationClass":
"org.apache.camel.component.irc.IrcConfiguration", "configurationField":
"configuration", "description": "Delay in milliseconds before sending commands
after the connection is established." },
"keys": { "index": 5, "kind": "parameter", "displayName": "Keys", "group":
"common", "label": "common", "required": false, "type": "string", "javaType":
"java.lang.String", "deprecated": false, "autowired": false, "secret": false,
"configurationClass": "org.apache.camel.component.irc.IrcConfiguration",
"configurationField": "configuration", "description": "Comma separated list of
keys for channels." },
- "namesOnJoin": { "index": 6, "kind": "parameter", "displayName": "Names On
Join", "group": "common", "label": "common", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": false, "configurationClass":
"org.apache.camel.component.irc.IrcConfiguration", "configurationField":
"configuration", "description": "Sends NAMES command to channel after joining
it. onReply has to be true in order to process the re [...]
+ "namesOnJoin": { "index": 6, "kind": "parameter", "displayName": "Names On
Join", "group": "common", "label": "common", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": false, "autowired": false,
"secret": false, "defaultValue": false, "configurationClass":
"org.apache.camel.component.irc.IrcConfiguration", "configurationField":
"configuration", "description": "Sends NAMES command to channel after joining
it. onReply has to be true in order to process the re [...]
"nickname": { "index": 7, "kind": "parameter", "displayName": "Nickname",
"group": "common", "label": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.irc.IrcConfiguration", "configurationField":
"configuration", "description": "The nickname used in chat." },
"persistent": { "index": 8, "kind": "parameter", "displayName":
"Persistent", "group": "common", "label": "", "required": false, "type":
"boolean", "javaType": "boolean", "deprecated": true, "autowired": false,
"secret": false, "defaultValue": true, "configurationClass":
"org.apache.camel.component.irc.IrcConfiguration", "configurationField":
"configuration", "description": "Use persistent messages." },
"realname": { "index": 9, "kind": "parameter", "displayName": "Realname",
"group": "common", "label": "common", "required": false, "type": "string",
"javaType": "java.lang.String", "deprecated": false, "autowired": false,
"secret": false, "configurationClass":
"org.apache.camel.component.irc.IrcConfiguration", "configurationField":
"configuration", "description": "The IRC user's actual name." },
diff --git a/components/camel-irc/src/main/docs/irc-component.adoc
b/components/camel-irc/src/main/docs/irc-component.adoc
index 4fc2b4b13c2e..842140ba98e5 100644
--- a/components/camel-irc/src/main/docs/irc-component.adoc
+++ b/components/camel-irc/src/main/docs/irc-component.adoc
@@ -130,7 +130,7 @@
irc:[email protected]?channels=#chan1,#chan2,#chan3&keys=chan1Key,,chan3key
=== Getting a list of channel users
Using the `namesOnJoin` option one can invoke the IRC-`NAMES` command after
the component has joined a channel.
-The server will reply with `irc.num = 353`. So to process the result the
property `onReply` has to be `true`.
+The server will reply with `CamelIrcNum = 353`. So to process the result the
property `onReply` has to be `true`.
Furthermore, one has to filter the `onReply` exchanges to get the names.
For example, we want to get all exchanges that contain the usernames of the
channel:
@@ -139,8 +139,8 @@ For example, we want to get all exchanges that contain the
usernames of the chan
-----------------------------------------------------------------------------
from("ircs:nick@myserver:1234/#mychannelname?namesOnJoin=true&onReply=true")
.choice()
- .when(header("irc.messageType").isEqualToIgnoreCase("REPLY"))
- .filter(header("irc.num").isEqualTo("353"))
+
.when(header("CamelIrcMessageType").isEqualToIgnoreCase("REPLY"))
+ .filter(header("CamelIrcNum").isEqualTo("353"))
.to("mock:result").stop();
-----------------------------------------------------------------------------
@@ -153,7 +153,7 @@ You can specify the destination in the following header:
[width="100%",cols="10%,10%,80%",options="header",]
|=====================================================================
|Header |Type |Description
-|`irc.sendTo` |`String` |The channel (or the person) name.
+|`CamelIrcSendTo` |`String` |The channel (or the person) name.
|=====================================================================
diff --git
a/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcConfiguration.java
b/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcConfiguration.java
index fed80ae45bb5..2889cf239ad5 100644
---
a/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcConfiguration.java
+++
b/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcConfiguration.java
@@ -522,7 +522,7 @@ public class IrcConfiguration implements Cloneable {
/**
* Sends <code>NAMES</code> command to channel after joining it.<br>
* {@link #onReply} has to be <code>true</code> in order to process the
result which will have the header value
- * <code>irc.num = '353'</code>.
+ * <code>CamelIrcNum = '353'</code>.
*/
public void setNamesOnJoin(boolean namesOnJoin) {
this.namesOnJoin = namesOnJoin;
diff --git
a/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcConstants.java
b/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcConstants.java
index a408f58f4694..1b7a43556d66 100644
---
a/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcConstants.java
+++
b/components/camel-irc/src/main/java/org/apache/camel/component/irc/IrcConstants.java
@@ -23,27 +23,27 @@ import org.apache.camel.spi.Metadata;
*/
public final class IrcConstants {
@Metadata(description = "The type of message", javaType = "String")
- public static final String IRC_MESSAGE_TYPE = "irc.messageType";
+ public static final String IRC_MESSAGE_TYPE = "CamelIrcMessageType";
@Metadata(description = "The target", javaType = "String")
- public static final String IRC_TARGET = "irc.target";
+ public static final String IRC_TARGET = "CamelIrcTarget";
@Metadata(description = "The nickname or channel the message should be
sent to.", javaType = "String")
- public static final String IRC_SEND_TO = "irc.sendTo";
+ public static final String IRC_SEND_TO = "CamelIrcSendTo";
@Metadata(description = "The nickname of the user who is kicked from a
channel (passive).", javaType = "String")
- public static final String IRC_USER_KICKED = "irc.user.kicked";
+ public static final String IRC_USER_KICKED = "CamelIrcUserKicked";
@Metadata(description = "The host of the person who sent the line.",
javaType = "String")
- public static final String IRC_USER_HOST = "irc.user.host";
+ public static final String IRC_USER_HOST = "CamelIrcUserHost";
@Metadata(description = "The nickname of the person who sent the line or
the server name of the server which sent the line.",
javaType = "String")
- public static final String IRC_USER_NICK = "irc.user.nick";
+ public static final String IRC_USER_NICK = "CamelIrcUserNick";
@Metadata(description = "The server name of the server which sent the line
or the nickname of the person who sent the line.",
javaType = "String")
- public static final String IRC_USER_SERVERNAME = "irc.user.servername";
+ public static final String IRC_USER_SERVERNAME = "CamelIrcUserServername";
@Metadata(description = "The username of the person who sent the line.",
javaType = "String")
- public static final String IRC_USER_USERNAME = "irc.user.username";
+ public static final String IRC_USER_USERNAME = "CamelIrcUserUsername";
@Metadata(description = "The numeric reply.", javaType = "int")
- public static final String IRC_NUM = "irc.num";
+ public static final String IRC_NUM = "CamelIrcNum";
@Metadata(description = "The first part of the message", javaType =
"String")
- public static final String IRC_VALUE = "irc.value";
+ public static final String IRC_VALUE = "CamelIrcValue";
private IrcConstants() {
// Utility class
diff --git
a/components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcMultiChannelRouteIT.java
b/components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcMultiChannelRouteIT.java
index dc950df00ff4..9c7510b259e8 100644
---
a/components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcMultiChannelRouteIT.java
+++
b/components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcMultiChannelRouteIT.java
@@ -78,8 +78,8 @@ public class IrcMultiChannelRouteIT extends
IrcIntegrationITSupport {
* Lets send messages once the consumer has joined
*/
protected void sendMessages() {
- template.sendBodyAndHeader(sendUri(), body1, "irc.sendTo",
properties.get("channel1"));
- template.sendBodyAndHeader(sendUri(), body2, "irc.sendTo",
properties.get("channel2"));
+ template.sendBodyAndHeader(sendUri(), body1, IrcConstants.IRC_SEND_TO,
properties.get("channel1"));
+ template.sendBodyAndHeader(sendUri(), body2, IrcConstants.IRC_SEND_TO,
properties.get("channel2"));
template.sendBody(sendUri(), body3);
}
diff --git
a/components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcPrivmsgIT.java
b/components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcPrivmsgIT.java
index d370e540ce6c..f2902886b92f 100644
---
a/components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcPrivmsgIT.java
+++
b/components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcPrivmsgIT.java
@@ -84,8 +84,8 @@ public class IrcPrivmsgIT extends IrcIntegrationITSupport {
if (!sentMessages) {
sentMessages = true;
- template.sendBodyAndHeader(sendUri(), body1, "irc.target",
properties.get("camelFrom"));
- template.sendBodyAndHeader(sendUri(), body2, "irc.target",
properties.get("camelFrom"));
+ template.sendBodyAndHeader(sendUri(), body1,
IrcConstants.IRC_TARGET, properties.get("camelFrom"));
+ template.sendBodyAndHeader(sendUri(), body2,
IrcConstants.IRC_TARGET, properties.get("camelFrom"));
}
}
}
diff --git
a/components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcsListUsersIT.java
b/components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcsListUsersIT.java
index 638ddeb439f8..88b5c9592832 100644
---
a/components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcsListUsersIT.java
+++
b/components/camel-irc/src/test/java/org/apache/camel/component/irc/it/IrcsListUsersIT.java
@@ -19,6 +19,7 @@ package org.apache.camel.component.irc.it;
import org.apache.camel.RoutesBuilder;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.component.irc.IrcConfiguration;
+import org.apache.camel.component.irc.IrcConstants;
import org.junit.jupiter.api.Test;
import org.junit.jupiter.api.condition.EnabledIfSystemProperty;
import org.slf4j.Logger;
@@ -53,8 +54,8 @@ public class IrcsListUsersIT extends IrcIntegrationITSupport {
from(PRODUCER_URI + "?namesOnJoin=true&onReply=true")
.choice()
-
.when(header("irc.messageType").isEqualToIgnoreCase("REPLY"))
- .filter(header("irc.num").isEqualTo(IRC_RPL_NAMREPLY))
+
.when(header(IrcConstants.IRC_MESSAGE_TYPE).isEqualToIgnoreCase("REPLY"))
+
.filter(header(IrcConstants.IRC_NUM).isEqualTo(IRC_RPL_NAMREPLY))
.to("mock:result").stop();
}
};
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 8a9a9c9fcf43..57bcd3128ba7 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
@@ -853,6 +853,59 @@ A new accessor `web3jOperation()` is also generated for
`Web3jConstants.OPERATIO
(the producer dispatch header). This constant did not appear in the catalog
previously, so no DSL accessor renaming applies to it.
+=== camel-irc - potential breaking change
+
+The Exchange header constants in `IrcConstants` 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
+| `IrcConstants.IRC_MESSAGE_TYPE` | `irc.messageType` |
`CamelIrcMessageType`
+| `IrcConstants.IRC_TARGET` | `irc.target` |
`CamelIrcTarget`
+| `IrcConstants.IRC_SEND_TO` | `irc.sendTo` |
`CamelIrcSendTo`
+| `IrcConstants.IRC_USER_KICKED` | `irc.user.kicked` |
`CamelIrcUserKicked`
+| `IrcConstants.IRC_USER_HOST` | `irc.user.host` |
`CamelIrcUserHost`
+| `IrcConstants.IRC_USER_NICK` | `irc.user.nick` |
`CamelIrcUserNick`
+| `IrcConstants.IRC_USER_SERVERNAME` | `irc.user.servername` |
`CamelIrcUserServername`
+| `IrcConstants.IRC_USER_USERNAME` | `irc.user.username` |
`CamelIrcUserUsername`
+| `IrcConstants.IRC_NUM` | `irc.num` | `CamelIrcNum`
+| `IrcConstants.IRC_VALUE` | `irc.value` | `CamelIrcValue`
+|===
+
+Routes that reference the constant symbolically (for example
+`header(IrcConstants.IRC_SEND_TO)` or
+`setHeader(IrcConstants.IRC_TARGET, ...)`) continue to work without changes.
+Routes that set or read the header by its literal string value (for example
+`setHeader("irc.sendTo", ...)`) must be updated to use the new value:
+
+[source,java]
+----
+// before
+template.sendBodyAndHeader("irc:[email protected]/#chan", "hello",
+ "irc.sendTo", "#otherchan");
+
+// after
+template.sendBodyAndHeader("irc:[email protected]/#chan", "hello",
+ "CamelIrcSendTo", "#otherchan");
+----
+
+==== Behaviour change: cross-transport propagation of irc.* headers
+
+Because the renamed header values now begin with `Camel`, they are filtered by
+the standard transport `HeaderFilterStrategy` (`JmsHeaderFilterStrategy`,
+`HttpHeaderFilterStrategy`, etc.) when crossing a transport boundary, by design
+— `Camel*` headers are framework-internal and are not propagated over the wire.
+
+Routes that bridge an external transport (HTTP, JMS, ...) into an `irc:`
+producer and let the sender choose the IRC destination via the `irc.sendTo`
+header must therefore carry that value in a non-`Camel`-prefixed application
+header and map it to `IrcConstants.IRC_SEND_TO` in the route between the
+transport `from` and the `irc:` `to`. Allowing untrusted senders to drive
+`IrcConstants.IRC_SEND_TO` without such a mapping step is not the intended use
+of the component.
+
== Upgrading from 4.18.1 to 4.18.2
=== camel-platform-http-main
diff --git
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/IrcEndpointBuilderFactory.java
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/IrcEndpointBuilderFactory.java
index 1597d8f70a3e..e3bd5f53d29a 100644
---
a/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/IrcEndpointBuilderFactory.java
+++
b/dsl/camel-endpointdsl/src/generated/java/org/apache/camel/builder/endpoint/dsl/IrcEndpointBuilderFactory.java
@@ -136,7 +136,7 @@ public interface IrcEndpointBuilderFactory {
/**
* Sends NAMES command to channel after joining it. onReply has to be
* true in order to process the result which will have the header value
- * irc.num = '353'.
+ * CamelIrcNum = '353'.
*
* The option is a: <code>boolean</code> type.
*
@@ -153,7 +153,7 @@ public interface IrcEndpointBuilderFactory {
/**
* Sends NAMES command to channel after joining it. onReply has to be
* true in order to process the result which will have the header value
- * irc.num = '353'.
+ * CamelIrcNum = '353'.
*
* The option will be converted to a <code>boolean</code> type.
*
@@ -872,7 +872,7 @@ public interface IrcEndpointBuilderFactory {
/**
* Sends NAMES command to channel after joining it. onReply has to be
* true in order to process the result which will have the header value
- * irc.num = '353'.
+ * CamelIrcNum = '353'.
*
* The option is a: <code>boolean</code> type.
*
@@ -889,7 +889,7 @@ public interface IrcEndpointBuilderFactory {
/**
* Sends NAMES command to channel after joining it. onReply has to be
* true in order to process the result which will have the header value
- * irc.num = '353'.
+ * CamelIrcNum = '353'.
*
* The option will be converted to a <code>boolean</code> type.
*
@@ -1537,7 +1537,7 @@ public interface IrcEndpointBuilderFactory {
/**
* Sends NAMES command to channel after joining it. onReply has to be
* true in order to process the result which will have the header value
- * irc.num = '353'.
+ * CamelIrcNum = '353'.
*
* The option is a: <code>boolean</code> type.
*
@@ -1554,7 +1554,7 @@ public interface IrcEndpointBuilderFactory {
/**
* Sends NAMES command to channel after joining it. onReply has to be
* true in order to process the result which will have the header value
- * irc.num = '353'.
+ * CamelIrcNum = '353'.
*
* The option will be converted to a <code>boolean</code> type.
*
@@ -2136,10 +2136,10 @@ public interface IrcEndpointBuilderFactory {
*
* Group: common
*
- * @return the name of the header {@code irc.messageType}.
+ * @return the name of the header {@code IrcMessageType}.
*/
- public String ircMessagetype() {
- return "irc.messageType";
+ public String ircMessageType() {
+ return "CamelIrcMessageType";
}
/**
* The target.
@@ -2148,10 +2148,10 @@ public interface IrcEndpointBuilderFactory {
*
* Group: common
*
- * @return the name of the header {@code irc.target}.
+ * @return the name of the header {@code IrcTarget}.
*/
public String ircTarget() {
- return "irc.target";
+ return "CamelIrcTarget";
}
/**
* The nickname or channel the message should be sent to.
@@ -2160,10 +2160,10 @@ public interface IrcEndpointBuilderFactory {
*
* Group: common
*
- * @return the name of the header {@code irc.sendTo}.
+ * @return the name of the header {@code IrcSendTo}.
*/
- public String ircSendto() {
- return "irc.sendTo";
+ public String ircSendTo() {
+ return "CamelIrcSendTo";
}
/**
* The nickname of the user who is kicked from a channel (passive).
@@ -2172,10 +2172,10 @@ public interface IrcEndpointBuilderFactory {
*
* Group: common
*
- * @return the name of the header {@code irc.user.kicked}.
+ * @return the name of the header {@code IrcUserKicked}.
*/
public String ircUserKicked() {
- return "irc.user.kicked";
+ return "CamelIrcUserKicked";
}
/**
* The host of the person who sent the line.
@@ -2184,10 +2184,10 @@ public interface IrcEndpointBuilderFactory {
*
* Group: common
*
- * @return the name of the header {@code irc.user.host}.
+ * @return the name of the header {@code IrcUserHost}.
*/
public String ircUserHost() {
- return "irc.user.host";
+ return "CamelIrcUserHost";
}
/**
* The nickname of the person who sent the line or the server name of
@@ -2197,10 +2197,10 @@ public interface IrcEndpointBuilderFactory {
*
* Group: common
*
- * @return the name of the header {@code irc.user.nick}.
+ * @return the name of the header {@code IrcUserNick}.
*/
public String ircUserNick() {
- return "irc.user.nick";
+ return "CamelIrcUserNick";
}
/**
* The server name of the server which sent the line or the nickname of
@@ -2210,10 +2210,10 @@ public interface IrcEndpointBuilderFactory {
*
* Group: common
*
- * @return the name of the header {@code irc.user.servername}.
+ * @return the name of the header {@code IrcUserServername}.
*/
public String ircUserServername() {
- return "irc.user.servername";
+ return "CamelIrcUserServername";
}
/**
* The username of the person who sent the line.
@@ -2222,10 +2222,10 @@ public interface IrcEndpointBuilderFactory {
*
* Group: common
*
- * @return the name of the header {@code irc.user.username}.
+ * @return the name of the header {@code IrcUserUsername}.
*/
public String ircUserUsername() {
- return "irc.user.username";
+ return "CamelIrcUserUsername";
}
/**
* The numeric reply.
@@ -2234,10 +2234,10 @@ public interface IrcEndpointBuilderFactory {
*
* Group: common
*
- * @return the name of the header {@code irc.num}.
+ * @return the name of the header {@code IrcNum}.
*/
public String ircNum() {
- return "irc.num";
+ return "CamelIrcNum";
}
/**
* The first part of the message.
@@ -2246,10 +2246,10 @@ public interface IrcEndpointBuilderFactory {
*
* Group: common
*
- * @return the name of the header {@code irc.value}.
+ * @return the name of the header {@code IrcValue}.
*/
public String ircValue() {
- return "irc.value";
+ return "CamelIrcValue";
}
}
static IrcEndpointBuilder endpointBuilder(String componentName, String
path) {