[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
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
MessageSight Test/Development
Internet:mlcohen@xxxxxxxxxx
also at:teddybbear@xxxxxxx
(512) 286-5744 (T/L 363-5744)
FAX (512) 973-4293
Bharath C ---06/10/2014 08:50:22 AM---Hi All, I need help from you to understand reconnect logic.
From: Bharath C <Bharath.C@xxxxxxxxxxxxxxxxxxx>
To: General development discussions for paho project <paho-dev@xxxxxxxxxxx>
Date: 06/10/2014 08:50 AM
Subject: [paho-dev] MQTT reconnect logic
Sent by: paho-dev-bounces@xxxxxxxxxxx
Hi All,
I need help from you to understand reconnect logic.
Right now I’m using these components:
>>mosquito 1.2
>> 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 org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:138)
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,
at org.eclipse.paho.client.mqttv3.internal.ExceptionHelper.createMqttException(ExceptionHelper.java:27)
at org.eclipse.paho.client.mqttv3.internal.ClientComms.sendNoWait(ClientComms.java:132)
at org.eclipse.paho.client.mqttv3.MqttAsyncClient.publish(MqttAsyncClient.java:785)
Basicallt my doubt is if the mqtt client gets disconnected, does it tries to reconnect or we need to do it ourself.
Regards,
Bharath.
L&T Technology Services Ltd
www.LntTechservices.com
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
paho-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/paho-dev