Can a web browser use MQTT?

Yes, as mentioned in Steve-o’s comment MQTT via websockets is very possible.

There are 2 options at the moment

  1. IBM’s MQ 7.5 comes with websockets support, you can find details here.
  2. The Mosquitto broker has a javascript client with an example running here.

To answer your second question lighttpd has a websockets module that can be used to do forwarding to an existing broker with details here.

I’ve not been able to find anything for Apache that doesn’t need you to write your own library to do the forwarding.

Leave a Comment