vertx-mqtt icon indicating copy to clipboard operation
vertx-mqtt copied to clipboard

MQTT Server should let the clients send the commands before CONNACK

Open paul-lysak opened this issue 5 years ago • 1 comments

According to the MQTT Spec section 3.1.4 (http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/errata01/os/mqtt-v3.1.1-errata01-os-complete.html#_Toc442180845): "Clients are allowed to send further Control Packets immediately after sending a CONNECT Packet; Clients need not wait for a CONNACK Packet to arrive from the Server." Eclipse IoT-Testware for MQTT (https://iottestware.readthedocs.io/en/master/mqtt_test_suite.html) follows this way, and some tests send control packets right after the CONNECT, before CONNACK arrives.

But current implementation of vertx-mqtt doesn't support it - for example, MqttServerConnection.handleSubscribe (as well as other handlers for control packets) calls MqttServerConnection.checkConnected, and checkConnected closes the socket if it is called prior to MqttEndpointImpl.accept(boolean).

paul-lysak avatar Mar 18 '19 11:03 paul-lysak

@ppatierno can we schedule this as a feature request ?

vietj avatar Mar 18 '19 13:03 vietj