Asked by Ravi Teja in our MQTT 5 webinar.
Answer: When using an MQTT broker that supports websockets, like HiveMQ, both Websocket or direct TCP is viable. Of course there is a minimal overhead when creating the TCP channel using websockets.
Common use cases for using websockets are:
- Your application that should get added MQTT connectivity already has a working web server
- You want to use the open 443 port for HTTPS, instead of opening an additional port for MQTT messaging.