Which transport mode is recommended while using mqtt, websockets or tcp?

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:

  1. Your application that should get added MQTT connectivity already has a working web server
  2. You want to use the open 443 port for HTTPS, instead of opening an additional port for MQTT messaging.