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 <[email protected]>
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 : [email protected] | mobile : +94 766819985