If we are facing issues consistently in with this client(Eclipse Paho), shall we try some others?
I found [1]. May there are better ones out there. Thanks. [1] https://github.com/fusesource/mqtt-client On Tue, Nov 11, 2014 at 11:50 AM, Reka Thirunavukkarasu <r...@wso2.com> wrote: > Hi, > > I built the lastet packs in the morning and when i deploy an application, > i'm getting the following: > > Do you have any idea on this? > > [2014-11-11 11:32:55,726] DEBUG > {org.apache.stratos.autoscaler.monitor.cluster.VMServiceClusterMonitor} - > Running minimum check for partition P1 > > [2014-11-11 11:33:20,256] DEBUG > {org.apache.stratos.messaging.message.receiver.cluster.status.ClusterStatusEventMessageListener} > - MQTT connection lost > > Connection lost (32109) - java.net.SocketException: Connection reset > > at > org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:138) > > at java.lang.Thread.run(Thread.java:745) > > Caused by: java.net.SocketException: Connection reset > > at java.net.SocketInputStream.read(SocketInputStream.java:196) > > at java.net.SocketInputStream.read(SocketInputStream.java:122) > > at java.net.SocketInputStream.read(SocketInputStream.java:210) > > at java.io.DataInputStream.readByte(DataInputStream.java:265) > > at > org.eclipse.paho.client.mqttv3.internal.wire.MqttInputStream.readMqttWireMessage(MqttInputStream.java:56) > > at > org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:100) > > ... 1 more > > [2014-11-11 11:33:20,256] DEBUG > {org.apache.stratos.messaging.message.receiver.instance.status.InstanceStatusEventMessageListener} > - MQTT connection lost > > Connection lost (32109) - java.net.SocketException: Connection reset > > at > org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:138) > > at java.lang.Thread.run(Thread.java:745) > > Caused by: java.net.SocketException: Connection reset > > at java.net.SocketInputStream.read(SocketInputStream.java:196) > > at java.net.SocketInputStream.read(SocketInputStream.java:122) > > at java.net.SocketInputStream.read(SocketInputStream.java:210) > > at java.io.DataInputStream.readByte(DataInputStream.java:265) > > at > org.eclipse.paho.client.mqttv3.internal.wire.MqttInputStream.readMqttWireMessage(MqttInputStream.java:56) > > at > org.eclipse.paho.client.mqttv3.internal.CommsReceiver.run(CommsReceiver.java:100) > > ... 1 more > > > > Thanks, > > Reka > > > On Tue, Nov 11, 2014 at 10:59 AM, Gayan Gunarathne <gay...@wso2.com> > wrote: > >> >> Hi Isuru, >> >> We can look at the asynchronous option as well.As this asynchronous >> client is non-blocking interface where methods return before the requested >> operation has completed.IMO If we use the asynchronous mode we need to >> tackle with the return delivery token to guaranteed the message delivery. >> In pahu samples there is a some examples with the asynchronous methods. >> SampleAsyncCallBack.java >> SampleAsyncWait.java >> >> In there doing is getting the MqttToken and waiting for that operation to >> complete. >> IMqttToken conToken = client.connect(conOpt,null,null); >> conToken.waitForCompletion(); >> >> I guess we also need to implement sort of a thing for guaranteed message >> delivery when using the asynchronous mode. >> >> Thanks, >> Gayan >> >> On Tue, Nov 11, 2014 at 10:09 AM, Isuru Haththotuwa <isu...@apache.org> >> wrote: >> >>> Hi devs, >>> >>> I experienced $subject again intermittently for the past day. I'm >>> looking in to this. >>> >>> One thing that I noted is that we have used a blocking MQTT client >>> implementation to publish and subscribe to the MB. There is a asynchronous >>> version [1] as well, which is more powerful than the blocking client. AFAIU >>> non-blocking client can be more suitable for a distributed setup such as >>> Stratos. Were there are specific reason to use the blocking client? >>> >>> [1]. >>> http://www.eclipse.org/paho/files/javadoc/org/eclipse/paho/client/mqttv3/MqttAsyncClient.html >>> >>> >>> -- >>> Thanks and Regards, >>> >>> Isuru H. >>> +94 716 358 048* <http://wso2.com/>* >>> >>> >>> >> >> >> -- >> >> Gayan Gunarathne >> Technical Lead >> WSO2 Inc. (http://wso2.com) >> email : gay...@wso2.com | mobile : +94 766819985 >> >> > > > > -- > Reka Thirunavukkarasu > Senior Software Engineer, > WSO2, Inc.:http://wso2.com, > Mobile: +94776442007 > > > -- -- Lahiru Sandaruwan Committer and PMC member, Apache Stratos, Senior Software Engineer, WSO2 Inc., http://wso2.com lean.enterprise.middleware email: lahi...@wso2.com blog: http://lahiruwrites.blogspot.com/ linked-in: http://lk.linkedin.com/pub/lahiru-sandaruwan/16/153/146