-
Notifications
You must be signed in to change notification settings - Fork 19
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
Offline Buffering? #24
Comments
@rgaufman The offline buffering features enables to buffer message or acknowledgement to be temporary store in case of network failure. Once the connection is reset, the buffer packet would be send. |
Is there any way to persist this data to some persistent store? - e.g. a local sqlite database or something. |
I understand the need for an application to (temporary) store data in an offline state. However I don't think that it should be include in the MQTT client. Could you tell me more about why do you need a persistence local storage? |
This page explains it: https://www.hivemq.com/blog/are-your-mqtt-applications-resilient-enough/ - especially the section "Offline Buffering". But basically, the functionality of QOS1 and QOS2 can be lost if the MQTT library can't gracefully handle connection loss and cache the messages in an offline persistent cache. The concept of persistence is also lost as the message sent is not really persistent, it will be lost if the process dies or the unit is rebooted while offline. So if paho can't send a message for any reason, can I add some kind of callback to manually store this message in an offline cache? - can I also add a callback when the connection is restored to then re-send all those messages from the offline cache? |
Thank you very for this docs. In order to separate the business logic form the transport layer, the MQTT client might have to store data in local back-end in case of offline state. This would add extra dependencies (sqlite, ORM....), however it could provide are better offline handling. |
Have anybody implemented full proof solution for the above case for offline buffering using sqlite or any other database?? Any help would be appretiated. |
I found on this mailing list post that paho supports offline buffering: https://dev.eclipse.org/mhonarc/lists/paho-dev/msg03914.html
Where can I find more information about this? - what local store is used for the offline buffering?
The text was updated successfully, but these errors were encountered: