How does MQTT save battery and maintain limited network connectivity?

I read about MQTT and I understand that it uses TCP for network transport. So if I have a mobile app that sends a subscription request, I assume it will be a full duplex connection so that the client can be notified of incoming point data.

How does it work more on battery and mains power? I mean you still have an open TCP connection. Also how it handles disconnect, does it automatically connect to the broker?

+3


source to share


1 answer


Taking into account my comment on the question, assuming you want to compare against the HTTP Long protocol, these 2 links may help answer your question:

https://www.ibm.com/developerworks/community/blogs/sowhatfordevs/entry/using_mqtt_protocol_advantages_over_http_in_mobile_application_development5?lang=en

http://stephendnicholas.com/archives/1217



TL; DR version:

Message sizes tend to be significantly smaller with MQTT and HTTP (especially when you take into account all the HTTP headers that are sent), this saves on network usage and in turn on battery usage.

As far as the reconnection issue is concerned, the client libraries don't automatically connect, but they fire a callback when the connection drops, so you can handle the reconnection as needed.

+4


source







All Articles