Thanks Marc . connectionLost would be a the right way to do.
Since I’m using persistence client, I guess I need to disconnect first and the client using same parameters.
Just want to clarify.
I came across this client
Which says it reconnects by itself. I would be gr8 if paho could provide it.
From: paho-dev-bounces@xxxxxxxxxxx [mailto:paho-dev-bounces@xxxxxxxxxxx]
On Behalf Of Marc L Cohen
Sent: Tuesday, June 10, 2014 7:30 PM
To: General development discussions for paho project
Subject: Re: [paho-dev] MQTT reconnect logic
You need to provide code to do the reconnect. I do that in the connectionLost method on the callback.
Marc L. Cohen
(512) 286-5744 (T/L 363-5744)
FAX (512) 973-4293
C ---06/10/2014 08:50:22 AM---Hi All, I need help from you to understand reconnect logic.
Bharath C <Bharath.C@xxxxxxxxxxxxxxxxxxx>
General development discussions for paho project <paho-dev@xxxxxxxxxxx>
06/10/2014 08:50 AM
[paho-dev] MQTT reconnect logic
I need help from you to understand reconnect logic.
Right now I’m using these components:
>> Windows 7
>> Paho mqtt client java 0.4
>> Java 7, Spring 3.2.
Once the perisistence mqtt client gets disconnected (well I unplug my cable), then it throws an exception,
onnection lost (32109) - java.net.SocketTimeoutException: Read timed out
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketTimeoutException: Read timed out
Later when I try to publish ,
com.lnt.ubiqrede.exception.UBIQRedeException: Error while sending Data,
Basicallt my doubt is if the mqtt client gets disconnected, does it tries to reconnect or we need to do it ourself.
L&T Technology Services Ltd
This Email may contain confidential or privileged information for the intended recipient (s). If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system._______________________________________________
paho-dev mailing list
This Email may contain confidential or privileged information for the intended recipient (s). If you are not the intended recipient, please do not use or disseminate the information, notify the sender and delete it from your system.