Details
-
Improvement
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
3.5.0
-
None
-
Unknown
Description
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:
Caused by:
io.netty.handler.codec.http.websocketx.WebSocketHandshakeException:
Invalid subprotocol. Actual: stomp. Expected one of: null
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
io.netty.handler.codec.http.websocketx.WebSocketClientHandshaker
that there are constructors that can take a subprotocol as a parameter:
/** * 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); }
That would be great if we could pass this subprotocol to netty, to do some Stomp over Websocket
Attachments
Issue Links
- links to