From the MQTT spec: "Clients typically wait for a CONNACK Packet, However, if the Client exploits its freedom to send Control Packets before it receives a CONNACK, it might simplify the Client implementation as it does not have to police the connected state. The Client accepts that any data that it sends before it receives a CONNACK packet from the Server will not be processed if the Server rejects the connection."
Should we do this? I think no, but I'm putting it here to consider further.
I think that the current MQTT.js waits for the CONNACK packet.