Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [paho-dev] Disconnection issue on Android service

Thanks Rajitha for the feedback. For now, I have changed the keep alive to 1 minute. This may reduce the severity of the issue but won't fully resolve it.

I checked GCM's working and it also has similar limitation. If Internet connection breaks without any obvious sign on the device, GCM won't be able to receive 
any messages until it pings the server again, which can be as high as 15 minutes. 


Date: Thu, 15 Oct 2015 11:42:49 +0530
From: slamdamjc@xxxxxxxxx
To: paho-dev@xxxxxxxxxxx
Subject: Re: [paho-dev] Disconnection issue on Android service

Helllo Kamajeet,

I've been having the same issue. Until now I could only lower the keep alive interval as a solution. More than keeping the connection alive, keep alive ping seems to be worth as a connection verifier here.
I wish there was a way for the client to register a connection loss in case of a message delivery failure too.

Would like to hear the views of the others on this matter.

Cheers.

On 14 October 2015 at 22:44, Kamaljeet <kamaljeetmaini@xxxxxxxxxxx> wrote:
Hello,
I have run into a corner case issue while using Paho Android service. Here is the scenario:

1) Connect Android device to a Wi-Fi Access Point
2) Using Paho Android service, connect and subscribe to a topic
3) Verify that service can receive messages on the topic
4) Disconnect Internet cable from Wi-Fi router. There is no change in connection between Android and Wi-Fi AP.
5) Reconnect the Internet cable to the Wi-Fi router.
6) Send a message on the topic. The message is NOT received. This continues to happen until the next keepalive interval. 

It seems that when Wi-Fi AP loses Internet connection, this tears down the connection between service and broker but service is not notified of this by the Android system. This is because there is no change in Wi-Fi connectivity. Even when Wi-Fi AP connects back to Internet, the Android service has no connection to the broker. Only when the keepalive interval expires and service tries to communicate with the broker, it finds out that connection is broken and it tries to reestablish the connection.

Have you come access this scenario? Is there a potential solution or upcoming fix for this?

I have a keepalive of 10 minutes, so this causes missed MQTT messages for up to 10 minutes. 

Thanks,
Kamaljeet


_______________________________________________
paho-dev mailing list
paho-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/paho-dev


_______________________________________________ paho-dev mailing list paho-dev@xxxxxxxxxxx To change your delivery options, retrieve your password, or unsubscribe from this list, visit https://dev.eclipse.org/mailman/listinfo/paho-dev

Back to the top