Nowa Concordia
Nowa Concordia

Reputation: 739

Does Eclipse Paho Mqtt Client persist all the published messages published till they are ACKed for delivery by the broker under QoS-2?

Does the default PAHO MQTT implementation persist all the messages that are being pushed, until their delivery is confirmed specifically in QoS 2 ? Or if not how is it possible to implement such by our own?

UPDATE Since paho android service version 1.1.0 automatic reconnect and offline buffering features are implemented. For more info : https://www.eclipse.org/paho/clients/android/

Upvotes: 3

Views: 3828

Answers (2)

Nowa Concordia
Nowa Concordia

Reputation: 739

UPDATE

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

Upvotes: 0

hardillb
hardillb

Reputation: 59628

From the javadoc for MqttClient

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

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

Upvotes: 6

Related Questions