-
Notifications
You must be signed in to change notification settings - Fork 171
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
Unable to get NanoMQ implementation of Retained Messages to function correctly #1769
Comments
Thanks for reporting issue |
We've tried as old as 0.21.5-full and the problem is still there. We observed a weird behavior with the non-TLS connection, though. Somehow, the retain feature works fine over non-TLS connection. Upon multiple manual connect/disconnect, we are able to get the retained message with MQTTX. If we publish a retained message over non-TLS connection, and try to connect over TLS connection with the same subscription, then we can actually receive the retained message without any issue. However, once we publish the same retained message over TLS, then the issue comes back. We have even tested with MQTT Version 3.1, and the issue is still there. Hope that helps. Thank you. |
Signed-off-by: jaylin <jaylin@emqx.io>
A great catch!Thank you! @codetronics |
We are happy to be of great help, and glad that the issue is fixed. Thank you! |
Will publish a 0.21.10 release soon. happy to get any feedback from you. |
Tested the latest 0.21.10-full docker image and the reported issue is resolved. Thank you very much! @JaylinYu |
Describe the bug
Cannot get the Retained Messages feature to work correctly with nanomq:0.21.9-full docker image over TLS. Once a message with retain flag is set and published, the same client with the intended topic already subscribed will cause a failure on reconnect. We are using the following tutorial to get the 'Retained Messages' feature to function.
https://nanomq.io/docs/en/latest/tutorial/retain-msg-persistence.html
Expected behavior
Supposed to work correctly like with EMQX broker.
Actual Behavior
Client is unable to establish connection with the broker if the subscribed topic has a retained message.
To Reproduce
We are testing the docker version of nanomq.
Clear /tmp content, restart nanomq app and then try to send a retain message to topic A. Subscribe to the topic A with the same client and then try to reconnect. Message should persist.
Environment Details
Additional context
Below is the log from NanoMQ when the failure occurs.
nanomq.log
Below is the log from MQTTX client on failure to reconnect :-
The text was updated successfully, but these errors were encountered: