oscerd opened a new pull request, #25366: URL: https://github.com/apache/camel/pull/25366
## Description Renames the Exchange header string values in `WebsocketConstants` from the dotted `websocket.*` prefix to the project-wide `Camel<Component><Feature>` convention documented in [`design/headers.adoc`](https://github.com/apache/camel/blob/main/design/headers.adoc): | Constant | Previous value | New value | |---|---|---| | `CONNECTION_KEY` | `websocket.connectionKey` | `CamelAtmosphereWebsocketConnectionKey` | | `CONNECTION_KEY_LIST` | `websocket.connectionKey.list` | `CamelAtmosphereWebsocketConnectionKeyList` | | `SEND_TO_ALL` | `websocket.sendToAll` | `CamelAtmosphereWebsocketSendToAll` | | `EVENT_TYPE` | `websocket.eventType` | `CamelAtmosphereWebsocketEventType` | | `ERROR_TYPE` | `websocket.errorType` | `CamelAtmosphereWebsocketErrorType` | The Java field names are unchanged, so code referencing the constants symbolically keeps working. Code using the literal strings must be updated. ## Background `camel-atmosphere-websocket` was in scope for CAMEL-23532, but that change only applied the inherited `HeaderFilterStrategy` to the consumer's WebSocket query parameters. The constants themselves stayed on the legacy `websocket.` prefix, unlike the `camel-vertx-websocket` sibling which was renamed in the same ticket. Since `WebsocketEndpoint extends ServletEndpoint`, the inherited `HttpHeaderFilterStrategy` filters only the `Camel` / `camel` prefixes, so the dotted names sat outside the filtered namespace in both directions. This continues the CAMEL-23577 alignment sweep (CAMEL-23574, CAMEL-23584, CAMEL-23588, CAMEL-23716). ### Note on the spelling The values use the concatenated form mandated by `design/headers.adoc` (`"Camel" + ComponentName + Feature`, PascalCase, no separators), matching what the rest of the sweep shipped: `CamelDnsServer`, `CamelJiraIssueKey`, `CamelIrcSendTo`. The dotted `CamelVertxWebsocket.*` form used by the vertx sibling is one of only 37 dotted header values repo-wide against 2313 concatenated, and is not copied here. `SEND_TO_ALL` is not read by this component at all: broadcast is selected through the `sendToAll` endpoint option, not the header. It is renamed only to keep the class internally consistent. ## Changes - `WebsocketConstants` - the five header values - New `WebsocketConstantsTest` - locks the values and asserts all five are filtered by the inherited `HttpHeaderFilterStrategy` in both directions - 4.22 upgrade-guide entry, mirroring the CAMEL-23574 / CAMEL-23532 entries - Regenerated component metadata, catalog, `important-headers.json` / `ImportantHeaderUtils`, and the endpoint DSL factory ## Testing - `camel-atmosphere-websocket` module build green: 14 tests pass (12 existing + 2 new) - Full reactor build from root (`mvn clean install -DskipTests`) green, all regenerated artifacts committed ## Backport The constants and the producer/consumer reads are identical on `main`, `camel-4.18.x` and `camel-4.14.x`, so this should be backported to both LTS lines with the matching 4.18 / 4.14 upgrade-guide entries (and those entries doc-synced back to `main` per the backport policy). --- _Claude Code on behalf of oscerd_ -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
