Closed Yusoo closed 6 months ago
Best example is probably the docker one. Files will only exist while messages are in flight (in normal circumstances they will be created/deleted pretty quickly!). Your code looks fine (well your SessionExpiryInterval
is pretty low but that might be intentional).
Note that if you want to queue outbound PUBLISH
packets whilst the connection is down then see the queue demo.
You need both of the above to match the 3.1.1 clients functionality (but this client is not limited to 65535 queued messages).
I am testing on windows, the program sends data to the MQTT server at regular intervals, when I stop the MQTT server, the program reports an error: connection with the MQTT server is currently down
, but I can't find any generated files.
Session store files are only created when the message is sent to the server, this only happens when the connection is up.
It will be difficult to create a situation where these files are visible becsuse they are deleted as soon as the message us fully delivered (the test suite does this by using a custom broker that can delay acknowledgements).
Changed to use paho.mqtt.golang and it seems to be working correctly :)
OK - closing this off.
Note that things were probably working properly with this repo too, but you were not really clear about what you expected making it difficult to help.
I am using autopaho, but no files are generated, my code like this
I'm not sure if something is wrong. Is there have any examples?