Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Hi guys


But, perhaps, the easy way is to implement the deliveryComplete(...) method of MqttCallback to store the delivered message"

How to do this above?
Please, I'm a newer in mqtt and paho

Em 12/05/2015 06:56, "Manuel Domínguez Dorado" <manolodd@xxxxxxxxx> escreveu:
However, Neuber, you could implement your own MqttClientPersistence to do whatever you want to do or, simpler, inherit from MqttDefaultFilePersistence maintaining everything intact except the required modifications to "store" the latest message sent into another place.

But, perhaps, the easy way is to implement the deliveryComplete(...) method of MqttCallback to store the delivered message.

Regards.

2015-05-12 11:48 GMT+02:00 Ian Craggs <icraggs@xxxxxxxxxxxxxxxxxxxxxxx>:
Hi,

it's a bit difficult to understand your question, so I'll take a guess.

The data persistence is only used for storing intermediate state of messages, not a record of previous publications.  Once a message has been successfully sent or received, it is no longer in the persistent store.

Ian


On 05/11/2015 11:51 PM, neuber sousa wrote:
http://blog.csdn.net/kuailebeihun_/article/details/25245023

i do this tutorial in eclipse kepler and everything is ok. 

Now I'm trying put         String tmpDir = System.getProperty("java.io.tmpdir");
and       final  MqttDefaultFilePersistence dataStore = new MqttDefaultFilePersiste(tmpDir); in this project
and in the server project (i.e.: the server project publish msg(s) to topic "xxx/yyy", with qos = 2)


My questions is: In the first time when I start a java project (in eclipse) , I need read latest post of the topic "xxx/yyy" relative to dataStore file persist.

How to do this ??




_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev

-- 
Ian Craggs                          
icraggs@xxxxxxxxxx                 IBM United Kingdom
Paho Project Lead; Committer on Mosquitto


_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev



--
---
Manuel Domínguez Dorado
ingeniero ARROBA ManoloDominguez PUNTO com
http://www.ManoloDominguez.com

_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev

Back to the top