[ https://issues.apache.org/jira/browse/CAMEL-15716?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
James Netherton updated CAMEL-15716: ------------------------------------ Fix Version/s: 3.7.0 > Allow to specify subprotocol when using camel-vertx-websocket component > ----------------------------------------------------------------------- > > Key: CAMEL-15716 > URL: https://issues.apache.org/jira/browse/CAMEL-15716 > Project: Camel > Issue Type: Improvement > Components: camel-vertx > Affects Versions: 3.5.0 > Reporter: ncasaux > Assignee: James Netherton > Priority: Minor > Fix For: 3.7.0 > > > Hello, > I would like to use the component *camel-vertx-websocket* to do some Stomp > over Websocket with an existing Websocket server (ActiveMQ in my use case). > However, netty logs keep saying this: > > {code:java} > Caused by: > io.netty.handler.codec.http.websocketx.WebSocketHandshakeException: > Invalid subprotocol. Actual: stomp. Expected one of: null > {code} > I would like to pass a value for the subprotocol (like v12.stomp), but I > don't know if it's possible. > However, I can see in the netty class > > {code:java} > io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker{code} > > that there are constructors that can take a subprotocol as a parameter: > > {code:java} > /** > * Base constructor > * > * @param uri > * URL for web socket communications. e.g "ws://myhost.com/mypath". > Subsequent web socket frames will be > * sent to this URL. > * @param version > * Version of web socket specification to use to connect to the server > * @param subprotocol > * Sub protocol request sent to the server. > * @param customHeaders > * Map of custom headers to add to the client request > * @param maxFramePayloadLength > * Maximum length of a frame's payload > */ > protected WebSocketClientHandshaker(URI uri, WebSocketVersion version, String > subprotocol, > HttpHeaders customHeaders, int maxFramePayloadLength) { > this(uri, version, subprotocol, customHeaders, maxFramePayloadLength, > DEFAULT_FORCE_CLOSE_TIMEOUT_MILLIS); > }{code} > > That would be great if we could pass this subprotocol to netty, to do some > Stomp over Websocket :) > -- This message was sent by Atlassian Jira (v8.3.4#803005)