Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Using Paho Android MQTT service.


The callback onSuccess will be invoked when the connection completed, while onFailure will be invoked if failed.
so, if the connection isn't completed the onSuccess will never be called, hence you will not publish anything, since
the client is not ready.

Not sure why the client cannot received CONNACK.  

Best Regards,
Bin Zhang(张斌)
WebSphere MQ, IBM China Software Development Lab
Notes:   Bin BJ Zhang/China/IBM
E-Mail:  zhbinbj@xxxxxxxxxx
Address: Ring Building 3F, ZhongGuanCun Software Park,

DongBeiWang West Road No.8, Haidian District, Beijing, 100193, China

From:        ನಾಗೇಶ್ ಸುಬ್ರಹ್ಮಣ್ಯ (Nagesh S) <nageshblore@xxxxxxxxx>
To:        General development discussions for paho project <paho-dev@xxxxxxxxxxx>,
Date:        2014/07/17 17:49
Subject:        Re: [paho-dev] Using Paho Android MQTT service.
Sent by:        paho-dev-bounces@xxxxxxxxxxx

Hi Bin,
I tried setting the waiting period to 5000ms but the waitForCompletion (for connect) still gives an exception. Also, I can see mosquitto logging a CONNACK for the client on emulator. Sounds odd that, connection to broker isn't complete for 5 seconds.

Just curious...if the connection isn't complete, how does having a callback for publish help ?

paho-dev mailing list
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

Back to the top