Implementation of getRemainingLength now conforms to the MQTT spec
Unhackified getting the subscription msg id