Eclipse Paho Mqtt client keeps all posted messages until they are forwarded by the broker over QoS-2?

Does the default PAHO MQTT implementation of all messages that are pushed until their delivery is confirmed specifically in QoS 2? Or if not, how is it possible to implement it yourself?

UPDATE As of paho android service version 1.1.0, auto reconnect and offline buffering features are implemented. For more information: https://www.eclipse.org/paho/clients/android/

+3


source to share


2 answers


From the javadoc for MqttClient

By default, MqttDefaultFilePersistence is used to store messages in a file. If persistence is set to null, messages are persisted in memory and therefore may be lost if the client, Java runtime, or device shuts down.



This means that as long as you set the path correctly and have Android permissions to write to local storage, QOS2 messages should persist until they are delivered to the broker (and not to end subscribers).

+6


source


UPDATE



Since automatic reconnection and offline buffering is implemented paho android service version 1.1.0. Please refer to: https://www.eclipse.org/paho/clients/android/ .

0


source







All Articles