eclipse-paho / paho.mqtt.golang

Other
2.77k stars 534 forks source link

MQTTv5: Publish Release encoding is invalid #641

Closed zzrrxx closed 1 year ago

zzrrxx commented 1 year ago

I tried to use paho/cmd/stdinpub/main.go to test the mqttv5 QoS2 publish functions, but it doesnt' work.

The packet "Publish Release" doesn't contain any properties. As the rfc says, it should be encoded as byte array []byte { 0 }.

Just like:

image

But its encoding is like:

image

MattBrittan commented 1 year ago

This client does not support MQTT v5 (as stated in the readme), so it's unsurprising that there are no properties. See this project for v5 support (but note that it does not fully support QOS1/2 yet - it works but the session state will not survive a disconnect and messages will never be retried).