|[paho-dev] "Offline Buffering" for Paho Clients|
I think the main reason, is that that is the way we have developed MQTT clients for as far back as I remember. But that ability does raise other questions for the API implementation, such as:
- how to manage the stored messages (what if the connection information is wrong and no messages ever get sent, limiting the storage used, etc)
- how frequently and when to attempt reconnection to the broker so we have avoided the problem by letting the application handle it.The Eclipse Kura project has an ostensibly protocol-neutral approach to this for Java, although currently I think it implements MQTT only. One of the main interfaces is here:
https://github.com/eclipse/kura/blob/develop/kura/org.eclipse.kura.api/src/main/java/org/eclipse/kura/data/DataService.javaI think it would be good to add offline buffering for the Paho clients, but what approach to take?
- for Java, just adopt or adapt the Kura implementation somehow? Just say, use Kura? Or have a more minimal implementation which varies less from the current Java API?
- for the others, adopt a Kura-like interface or something more minimal?I am thinking that the most minimal implementation would simply allow calling publish regardless of if a connection was available, with a limit on the number of stored messages.
Thoughts? -- Ian Craggs icraggs@xxxxxxxxxx IBM United Kingdom Committer on Paho, Mosquitto
Back to the top