This is an automated email from the ASF dual-hosted git repository.
oscerd pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new 0be886bf433c CAMEL-23629: camel-irc - align Exchange header constant
names with Camel naming convention
0be886bf433c is described below
commit 0be886bf433c718abe4a27498245f6898366fb0c
Author: Andrea Cosentino <[email protected]>
AuthorDate: Fri May 29 06:44:22 2026 +0200
CAMEL-23629: camel-irc - align Exchange header constant names with Camel
naming convention
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 global header-naming sweep. Updates the integration tests,
component docs
and setNamesOnJoin Javadoc, regenerates the camel-catalog and endpoint DSL
artifacts,
and adds a 4.21 upgrade-guide "potential breaking change" entry. To be
backported to
4.18.x and 4.14.x.
Closes #23594
---
.../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_21.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 17d2d30cc06d..748d07815eaa 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 17d2d30cc06d..748d07815eaa 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 1c2bea62afb6..bf0a61b5cc76 100644
--- a/components/camel-irc/src/main/docs/irc-component.adoc
+++ b/components/camel-irc/src/main/docs/irc-component.adoc
@@ -131,7 +131,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:
@@ -140,8 +140,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();
-----------------------------------------------------------------------------
@@ -154,7 +154,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 68a948fb0ac4..dd31b437749a 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
@@ -523,7 +523,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 3dd4760808ba..eaa42b7a1f43 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
@@ -24,27 +24,27 @@ import org.apache.camel.spi.Metadata;
@Deprecated(since = "4.21")
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_21.adoc
b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc
index 919a78f78fdb..17122c8aa8b4 100644
--- a/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc
+++ b/docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_21.adoc
@@ -1675,3 +1675,56 @@ per version of every blob in the container, each
carrying its own `versionId` an
enabled on the storage account. The same `prefix`, `regex` and
`maxResultsPerPage` filters as
`listBlobs` are honoured.
+=== 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.
+
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 3f2bac0daf76..dea93efd6748 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.
*
@@ -2139,10 +2139,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.
@@ -2151,10 +2151,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.
@@ -2163,10 +2163,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).
@@ -2175,10 +2175,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.
@@ -2187,10 +2187,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
@@ -2200,10 +2200,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
@@ -2213,10 +2213,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.
@@ -2225,10 +2225,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.
@@ -2237,10 +2237,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.
@@ -2249,10 +2249,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) {