java - MqttDefaultFilePersistence paho - How to read a persist file in client application? -


http://blog.csdn.net/kuailebeihun_/article/details/25245023

i tutorial in eclipse kepler , ok.

now i'm trying put string tmpdir = system.getproperty("java.io.tmpdir"); , final mqttdefaultfilepersistence datastore = new mqttdefaultfilepersiste(tmpdir); in project , in server project (i.e.: server project publish msg(s) topic "xxx/yyy", qos = 2)

my questions is: in first time when start java project (in eclipse) , need read latest post of topic "xxx/yyy" relative datastore file persist.

how ??

why need read persistence file? messages stored there until delivery has been confirmed (and on publishing side), assuming network connection file should empty time.

if want have last published message on given topic available subscribing client publish retained bit set true. means when client connects , subscribes topic last message delivered.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -