On MQTT Websocket close, a LWT message will be properly sent if
configured and a disconnect packet was not received
(cherry picked from commit bd442a3388b0f127c8f8b9fad5e4888b77bb42c3)
Prevent concurrent access to the MQTT protocol handlers which can lead
to a tansport level deadlock
(cherry picked from commit 96494f74c7142c3396f17696f345c2355c16a61c)
Ensure that the connection check task is stopped once commands pass
through the inactivity monitor to prevent the transport from being
closed for no reason.
(cherry picked from commit e47edd7a282e1391f480c1278555f4a86e9a8ea9)
Reworking patch so that the http trace method is also turned off by
default for the HttpTransport, besides just for the Websocket transport.
Also added SSL tests for both transports.
(cherry picked from commit 473b3284d42613b117bd5103d59435ab46f0c420)
Disabling the HTTP trace method on the websocket port by default. It
can be enabled by setting the parameter "http.enableTrace=true" on the
connection uri if it is needed for debugging.
(cherry picked from commit 4fb808397759b5569f8e8b49a486026aeaeecac2)
Making new values in ActiveMQObjectMessage transient which fixes HTTP
serialization
(cherry picked from commit b9dcb010f74675f6369f7e74b931b670e0ecab51)
WSServlet for websockets will attempt to detect the subprotocol
requested and respond with the appropriate one. Currently the protocols
loaded are what stomp.js use for stomp (v11.stomp and v12.stomp).
If a protocol can't be found then a default will be returned, either
"stomp" or "mqtt", which is the same behavior before this patch.
This will make it a bit easier to use stomp over websockets out of the
box as stomp.js will work by default.
(cherry picked from commit 913f64476b66c452fa03cb4fb8c09d831825bca5)
Fixing an intermittent test failure in:
org.apache.activemq.transport.ws.StompWSSTransportTest.
testHeartbeatsKeepsConnectionOpen
Adding synchronization on sends for StompWSConnection. The protocol
doesn't allow multiple threads to call a blocking send at the same time
and the heartbeat keep alive thread was colliding with the main
thread on sends.
Adding support for auto detection of wire protocols over a transport.
OpenWire, AMQP, STOMP, and MQTT can all be detected and the broker
will properly handle each one over a given Transport. Currently
auto TCP, NIO, SSL, and NIO+SSL transports can handle auto-detection
of the wire format and client but support could be added in the
future for other transports like websockets.
Clean up the MQTT over WebSocket code to allow for handling link
stealing and inactivity monitor. Ensures that the web socket instances
get cleaned up on errors and avoids leaks that might otherwise arise.
Adds new tests for MQTT over WebSocket.
Adds some missing license headers as well.
StompSocket and MQTTSocket will now return the appropriate web socket
remote address based on the HttpRequestServlet that initialized
the web socket connection.