'Why use MQTT over WebSockets instead of WebSockets? [duplicate]

MQTT is a lightweight protocol with low bandwidth and battery drain. In opposition, Websockets have hight battery drain. But if I need to use MQTT over Websockets, woundn't it be better just to use Websockets in the first place?

I'm designing a mobile application which needs live data and I'm concerned with battery drain.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source