Websockets with VerneMQ MQTT Broker

VerneMQ supports the WebSocket protocol out of the box. In this post you can find how to use Websockets with VerneMQ.

What is VerneMQ ?

VerneMQ is an enterprise ready, high-performance, distributed MQTT message broker. It scales horizontally and vertically on commodity hardware to support a high number of concurrent publishers and consumers while maintaining low and predictable latency and fault tolerance. It plugins can be developed in Erlang, Elixir, Lua, and any programming language that can implement HTTP WebHooks. It uses modern broadcast protocols and LevelDB for state replication in a cluster. It is Open Source and Apache2 licensed.

It is first and foremost a MQTT publish/subscribe message broker which implements the OASIS industry standard MQTT protocol. But VerneMQ is also built to take messaging and IoT applications to the next level by providing a unique set of features related to scalability, reliability and high-performance as well as operational simplicity.

To achieve these goals VerneMQ is designed from the ground up to work as a distributed message broker, ensuring continued operation in the event of node or network failures and easy horizontal scalability. The underlying technology is a proven telecom grade technology stack providing a rock solid foundation for systems that must be in continuous operation around the clock. It’s also able to make efficient use of all available resources as a basis for easy vertical scalability.

It uses a master-less clustering technology. There are no special nodes like masters or slaves to consider when the inevitable infrastructure changes or maintenance windows require adding or removing nodes. This makes operating the cluster safe and simple.

MQTT 5.0 support now available.

For more more information about VerneMQ Click Here!

Visit this post for Installtion : How To Install VerneMQ on UbunTu, RHEL, Docker, Debian and CentOS

Websockets with VerneMQ

VerneMQ supports the WebSocket protocol out of the box. To be able to open a WebSocket connection to VerneMQ, you have to configure a WebSocket listener or Secure WebSocket listener in the vernemq.conf file first: listener.ws.default = 127.0.0.1:9001 ​ listener.wss.default = 127.0.0.1:9002

Keep in mind that you’ll use MQTT-over-WebSocket, so you will need a Javascript library that implements the MQTT client behaviour. We have used the Eclipse Paho client as well as MQTT.js

You won’t be able to open WebSocket connections on a base URL, always add the /mqtt path.

Thanks for reading. If you like this post. probably you might like my next ones, so please support me by subscribing my blog.

You may like also:

Harshvardhan Mishra

Hi, I'm Harshvardhan Mishra. I am a tech blogger and an IoT Enthusiast. I am eager to learn and explore tech related stuff! also, I wanted to deliver you the same as much as the simpler way with more informative content. I generally appreciate learning by doing, rather than only learning. Thank you for reading my blog! Happy learning! Follow and send tweets me on @harshvardhanrvm. If you want to help support me on my journey, consider sharing my articles, or Buy me a Coffee!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this:
satta king tw