You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Jean-Baptiste Onofré (Jira)" <ji...@apache.org> on 2023/11/08 13:55:00 UTC
[jira] [Commented] (AMQ-9383) Websocket transport options do not get applied
[ https://issues.apache.org/jira/browse/AMQ-9383?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17784056#comment-17784056 ]
Jean-Baptiste Onofré commented on AMQ-9383:
-------------------------------------------
OK, no problem for 5.16.x ;)
> Websocket transport options do not get applied
> ----------------------------------------------
>
> Key: AMQ-9383
> URL: https://issues.apache.org/jira/browse/AMQ-9383
> Project: ActiveMQ
> Issue Type: Bug
> Components: Transport
> Affects Versions: 5.15.16, 5.18.3, 5.17.6, 5.16.7
> Reporter: Kostiantyn Miklevskyi
> Assignee: Jean-Baptiste Onofré
> Priority: Major
> Fix For: 6.0.0, 5.18.4, 5.17.7
>
>
> Configure broker transport connector like this:
> {code:java}
> <transportConnector name="amqpws" uri="ws://0.0.0.0:5680?amqp.traceFrames=true&wireFormat=amqp&wireFormat.transformer=jms&wireFormat.allowNonSaslConnections=true"/> {code}
>
> Try to connect to this instance with rhea.js library.
> First attempt to connect would be successful.
> Second and all subsequent attempts would fail.
> The only way to "fix" this would be a broker restart.
>
> The issue is here:
> [https://github.com/apache/activemq/blob/4bbb055187166706103d785e9665efb439792c51/activemq-http/src/main/java/org/apache/activemq/transport/ws/jetty9/WSServlet.java#L162]
>
> transportOptions would be "consumed" by introspection on the first connection attempt, and on subsequent attempts "allowNonSaslConnections" and "transformer" would not be there, so won't be applied to wireformat and the result would be an error.
>
> Interestingly this was already spotted and fixed in the same class for MQTT subprotocol here:
> [https://github.com/apache/activemq/blob/4bbb055187166706103d785e9665efb439792c51/activemq-http/src/main/java/org/apache/activemq/transport/ws/jetty9/WSServlet.java#L115C86-L115C86]
> by simply creating a copy of transport options before sending it into introspecting setters.
>
> Please apply the same fix.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)