The implementation is based on the ideas from the article https://www.nginx.com/blog/nginx-plus-iot-security-encrypt-authenticate-mqtt/. The specification: https://docs.solace.com/API/MQTT-v50-Prtl-Conformance-Spec/mqtt-v50-3-control-packets.htm
The implementation supports MQTT 5.