Andrea Cosentino created CAMEL-24446:
----------------------------------------

             Summary: camel-undertow - websocket.* producer header constants 
sit outside the Camel namespace
                 Key: CAMEL-24446
                 URL: https://issues.apache.org/jira/browse/CAMEL-24446
             Project: Camel
          Issue Type: Improvement
          Components: camel-undertow
            Reporter: Andrea Cosentino
            Assignee: Andrea Cosentino
             Fix For: 4.23.0


{{UndertowConstants}} defines the websocket dispatch headers outside the 
{{Camel}} prefix:

{code:java}
public static final String CONNECTION_KEY = "websocket.connectionKey";
public static final String CONNECTION_KEY_LIST = "websocket.connectionKey.list";
public static final String SEND_TO_ALL = "websocket.sendToAll";
{code}

{{UndertowProducer}} reads them straight off the message with 
{{in.getHeader()}}. Every HTTP consumer's default {{HeaderFilterStrategy}} 
filters names starting with {{Camel}}/{{camel}} only, so these names pass 
through untouched from any other consumer in the route.

CAMEL-23588 addressed the intra-component case - 
{{UndertowHeaderFilterStrategy}} strips {{websocket.*}} at undertow's own 
consumers - and its javadoc explicitly records the remaining cross-component 
case: a message entering through jetty, servlet, netty-http or platform-http 
and routed to an undertow websocket producer still carries whatever 
{{websocket.*}} headers it arrived with.

This is the same naming issue the CAMEL-23577 sweep addressed across other 
components; undertow was not included at the time because {{websocket.*}} is 
part of the component's documented external contract.

Proposal: introduce {{CamelUndertowWebSocket*}} spellings, read both for one 
minor release with the old ones deprecated, then drop the unprefixed forms. 
Needs an upgrade-guide entry.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to