-
Notifications
You must be signed in to change notification settings - Fork 821
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
retain flag does not work qith qos=0 in version 0.17 #845
Comments
I'll check this, but from MQTT specification http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/os/mqtt-v3.1.1-os.html :
So the server MUSTN'T store the retain in session state if the QoS is 0. However I'll check this. Thanks for reporting! |
Your welcome dear @andsel
It seems you have used this logic in the moquette version 0.17. |
How it's possible if the
While the problem you are reporting relates to the fact that a publish with QoS0 and retained = true it's not effectively retained, as I can understand from your description. |
I know what you mean, but I thought maybe you did it (MQTT 5.0 in version 0.17) wrong.
Exactly! That's what I mean |
Just a note, Moquette v0.17 doesn't implement MQTT5 |
I think your logic for Qos=0 is wrong! Because there is a lot use cases where we need to retain messages for IoT things with QoS=0. |
I think that's outside of specification
Give the ability to the broker implementation what to do on retained QoS0 publishes. |
There is a lot of MQTT clients for IoT devices (written to C, C++), but they have problems with QoS=1,2. |
Yep I think we can do that. Please close this issue an open one describing such feature, citing the use case. |
Hello.
I have cloned the
moquette version 0.17
inside of my java project, but retain flag does not work withqos = 0
, while I remember it was working in older versions of the moquette.note:
The moquette version 0.17 works with qos > 0, but unfortunately my own IoT Things need to qos = 0.
I have tested it by using
mosquitto_pub
andmosquitto_sub
as the below:First publish a sample topic:
mosquitto_pub -h host.com -p moqttPort -u username1 -P password1 -i clientID1 -t topic1 -m message1 -r -q 0
Then subscribe to get last published (retained) message of the above topic:
mosquitto_sub -h host.com -p mqttPort -u username2 -P password2 -i clientID2 -t topic1
but nothing is received by the subscriber.
The text was updated successfully, but these errors were encountered: