-
Notifications
You must be signed in to change notification settings - Fork 439
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
Setting SESSION_EXPIRY_INTERVAL in paho cpp V5 as client and mosquitto as server #323
Comments
I just tried it out. I added a session expiry to the v5 "chat" sample, I ran the sample and checked the connect packet it sent using WireShark. It shows the properly-formed packet with a session expiry property of 604800. So, on the client side, everything looks good. If the broker is not handling it properly, that's beyond what I'm able to do in the library here. Perhaps bring the issue to Mosquitto: |
I should mention that WireShark is an excellent debug tool for things like this. It understands MQTT, including v5 and has various helpful filters including simply "mqtt" to just display the MQTT traffic on a specific interface. Also, side point, but with the connect options, if you specify v5, you don't need to manually set clean session to false. That is done automatically when you set v5. |
Thanks for the quick reply. I will first try it with Wireshark. Then I will write the issue on the mosquitto page. |
Hi,
I have tried to connect Paho cpp V5 as a client to mosquitto server 2.0.2.
Since the client will be disconnected and reconnected always, the server should keep all messages when the client is not present.
Everything works perfectly when I set the version to 3. I can publish and subscribe to any topics, and after reconnection, the client gets all messages successfully.
When I set the version to 5, publishing and subscribing work fine. But the server doesn't keep the messages when the client is not present. It looks like that the SESSION_EXPIRY_INTERVAL parameter is not set correctly.
I am doing something wrong? Did anyone have the same issue?
Any suggestion would be appreciated.
The text was updated successfully, but these errors were encountered: