Skip to main content

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

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


Back to the top