Open jpwsutton opened 8 years ago
Hi I'm observing the same issue in version 1.1.1 of the paho.mqtt.android client. I'm using mosca as my MQTT Broker. I'll try switching to Mosquitto Broker to see if it fixes the issue and update.
@dorkmania Hi, If you do see this, could you provide some steps to recreate please?
@jpwsutton I'm invoking MqttAndroidClient.publish in the onSuccess case of the callback from MqttAndroidClient.connect in the onResume method of my activity. It seems that publish seems to trigger failure to connect (still need to confirm this) as far as the application is concerned and re-invokes connect. The publish message however, still seems to go through. I'm using MQTT for a client server use-case as compared to an IoT one. This might just be a case of the library working as designed but being a bad fit for my task. Your thoughts?
Interesting, have you got automatic reconnect or disconnected publishing enabled?
@jpwsutton I'm not explicitly setting these if that's what you mean. Any way to confirm that these are disabled?
Hi, I am using 'org.eclipse.paho:org.eclipse.paho.client.mqttv3:1.2.0' for messaging. I connect to mqtt broker using single client id in my whole application. When I manually switch off wifi, client gets disconnected and when wifi again available I try to connect the broker again, on that call I get 2 callback of success. It's happening with failure case as well. When I use different client id for every connection I get only single callback response. I want to connect using same client id every time, is there any solution to resolve this issue. I also tried with SNAPSHOT version, but still issue is reproducing. I am a new bee for Mqtt, any guidance will be really helpful for me.
Having the same issue on my Android TV app. I open my app, I press the Home button from my remote, then I open my app again. The MQTT callbacks are called twice. If I do this again then I get the same callbacks 3 times and so on... I initialise the MQTT inside the onCreate() of my MainActivity class.
Any idea what's wrong here?
I tried to disconnect the clients when the app enters Stop() method but with no success:
fun disconnect() {
for ((_, client) in clients) {
client.disconnect()
}
}
migrated from Bugzilla #482634 status UNCONFIRMED severity normal in component MQTT-Android for 1.2 Reported in version v0.5 on platform Other Assigned to: James Sutton
Original attachment names and IDs:
On 2015-11-19 19:02:34 -0500, Luxi Liu wrote:
On 2015-11-19 19:20:41 -0500, Luxi Liu wrote:
On 2015-11-25 06:37:53 -0500, James Sutton wrote:
On 2015-11-25 18:21:59 -0500, Luxi Liu wrote:
On 2015-11-27 08:34:04 -0500, James Sutton wrote:
On 2015-11-27 17:43:33 -0500, Luxi Liu wrote:
On 2015-11-30 04:50:17 -0500, James Sutton wrote:
On 2015-11-30 19:19:42 -0500, Luxi Liu wrote:
On 2015-12-01 04:07:00 -0500, James Sutton wrote:
On 2015-12-01 08:21:27 -0500, Luxi Liu wrote:
On 2015-12-01 08:44:12 -0500, Luxi Liu wrote:
On 2015-12-01 08:51:36 -0500, James Sutton wrote:
On 2015-12-01 08:55:03 -0500, James Sutton wrote:
On 2015-12-01 08:56:14 -0500, Luxi Liu wrote:
On 2015-12-01 08:57:19 -0500, Luxi Liu wrote:
On 2015-12-01 09:03:58 -0500, James Sutton wrote:
On 2015-12-02 01:22:18 -0500, Luxi Liu wrote:
On 2015-12-02 05:33:12 -0500, James Sutton wrote:
On 2015-12-17 09:55:35 -0500, James Sutton wrote:
On 2015-12-21 22:11:42 -0500, Luxi Liu wrote:
On 2015-12-22 06:36:31 -0500, Ian Craggs wrote:
On 2015-12-22 16:14:56 -0500, Luxi Liu wrote: