You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2026/08/06 10:59:00 UTC
[jira] [Resolved] (CAMEL-24359) camel-atmosphere-websocket - align Exchange header constant names with Camel naming convention
[ https://issues.apache.org/jira/browse/CAMEL-24359?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-24359.
---------------------------------
Resolution: Fixed
> camel-atmosphere-websocket - align Exchange header constant names with Camel naming convention
> ----------------------------------------------------------------------------------------------
>
> Key: CAMEL-24359
> URL: https://issues.apache.org/jira/browse/CAMEL-24359
> Project: Camel
> Issue Type: Improvement
> Components: camel-atmosphere-websocket
> Reporter: Andrea Cosentino
> Assignee: Andrea Cosentino
> Priority: Major
> Fix For: 4.22.0
>
>
> The {{camel-atmosphere-websocket}} component currently exposes its Exchange header contract through dotted, non-Camel-prefixed constant names:
> ||Constant in {{WebsocketConstants}}||Current value||Used by||
> |{{CONNECTION_KEY}}|{{"websocket.connectionKey"}}|{{WebsocketProducer}}, {{WebsocketConsumer}}|
> |{{CONNECTION_KEY_LIST}}|{{"websocket.connectionKey.list"}}|{{WebsocketProducer}}, {{WebsocketConsumer}}|
> |{{SEND_TO_ALL}}|{{"websocket.sendToAll"}}|declared only, no reader in this component|
> |{{EVENT_TYPE}}|{{"websocket.eventType"}}|{{WebsocketConsumer}}|
> |{{ERROR_TYPE}}|{{"websocket.errorType"}}|{{WebsocketConsumer}}|
> This diverges from the project-wide {{Camel<Component><Field>}} naming convention that the rest of the catalog has adopted (recent alignment work: CAMEL-23574, CAMEL-23584, CAMEL-23588, CAMEL-23716, under the CAMEL-23577 umbrella).
> The component was in scope for CAMEL-23532, but that change only applied the inherited {{HeaderFilterStrategy}} to the consumer's WebSocket query parameters. The constants themselves were left on the legacy {{websocket.}} prefix, unlike the sibling {{camel-vertx-websocket}} which was renamed to {{CamelVertxWebsocket.*}} in the same ticket.
> The new values follow the concatenated {{Camel<Component><Feature>}} form mandated by {{design/headers.adoc}}, which is what the rest of the sweep shipped ({{CamelDnsServer}}, {{CamelJiraIssueKey}}, {{CamelIrcSendTo}}). The dotted {{CamelVertxWebsocket.}} form used by the vertx sibling is a deviation from that document and is not being copied here. Since {{WebsocketEndpoint}} extends {{ServletEndpoint}}, the inherited {{HttpHeaderFilterStrategy}} filters only the {{Camel}} / {{camel}} prefixes, so the dotted names sit outside the filtered namespace in both directions.
> *Proposed change:*
> * Rename the constants in {{components/camel-atmosphere-websocket/src/main/java/org/apache/camel/component/atmosphere/websocket/WebsocketConstants.java}}:
> ** {{CONNECTION_KEY}} -> {{"CamelAtmosphereWebsocketConnectionKey"}}
> ** {{CONNECTION_KEY_LIST}} -> {{"CamelAtmosphereWebsocketConnectionKeyList"}}
> ** {{SEND_TO_ALL}} -> {{"CamelAtmosphereWebsocketSendToAll"}}
> ** {{EVENT_TYPE}} -> {{"CamelAtmosphereWebsocketEventType"}}
> ** {{ERROR_TYPE}} -> {{"CamelAtmosphereWebsocketErrorType"}}
> * Update {{WebsocketProducer}} and {{WebsocketConsumer}}, which read these values through the constants.
> * Update the component documentation page and regenerate the component-headers metadata (catalog regeneration).
> * Add an entry to {{docs/user-manual/modules/ROOT/pages/camel-4x-upgrade-guide-4_22.adoc}} (and the matching 4.18 / 4.14 guide files for backports) describing the rename, mirroring the CAMEL-23532 {{camel-vertx-websocket}} entry.
> * Note while in the file: {{SEND_TO_ALL}} has no reader in this component. The producer decides broadcast through the {{sendToAll}} endpoint option via {{getEndpoint().isSendToAll()}}, never through the header. Worth calling out in the docs so the published header contract is accurate.
> This keeps {{camel-atmosphere-websocket}} consistent with the rest of the catalog's header-naming convention and with its {{camel-vertx-websocket}} sibling.
> Affects: {{main}} (4.22.0-SNAPSHOT), {{camel-4.18.x}}, {{camel-4.14.x}} - the constants and the producer/consumer reads are identical across all three branches, so the change should be backported.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)