MQTT.js VS µWebSockets

Compare MQTT.js vs µWebSockets and see what are their differences.

µWebSockets

Simple, secure & standards compliant web server for the most demanding of applications (by uNetworking)
Our great sponsors
  • SurveyJS - Open-Source JSON Form Builder to Create Dynamic Forms Right in Your App
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
MQTT.js µWebSockets
15 41
8,300 16,718
1.2% 1.0%
9.0 8.6
6 days ago about 1 month ago
TypeScript C++
GNU General Public License v3.0 or later Apache License 2.0
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

MQTT.js

Posts with mentions or reviews of MQTT.js. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-06-25.
  • Server Sent Events simplified in SvelteKit
    2 projects | /r/sveltejs | 25 Jun 2023
  • Enriching Payloads with MQTT 5 Metadata, using AWS IoT Core Rules Engine
    1 project | dev.to | 8 Jun 2023
    First, we build two client simulators, for the car and the application client. We use MQTTJS for Javascript and its MQTT v5 implementation support. Step 1 below will describe the details of the MQTT client implementation.
  • Automatically Applying Configuration to IoT Devices with AWS IoT and AWS Step Functions - Part 1
    3 projects | dev.to | 7 Apr 2023
    We will simulate the device behavior using an MQTT client application built with the MQTT.js open-source library.
  • "Client <unknown> disconnected due to malformed packet."
    1 project | /r/MQTT | 7 Mar 2023
    Change your javascript to use MQTT.js instead of the no longer actively maintained paho library: https://github.com/mqttjs/MQTT.js/
  • MQTT in Plugin disconnects frequently
    2 projects | /r/StreamDeckSDK | 8 Feb 2023
    This all points to the direction that the underlying JS-Engine in the Streamdeck software might throttle the outgoing connections. I still don't understand what's under the hood. The user agent returns "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) QtWebEngine/6.3.1 Chrome/94.0.4606.126 Safari/537.36" What's the JS Engine in the Software? Is it Chrome? As far as I know, there are some issues with Websocket disconnects in Chrome due to aggressive throttling of background tabs. Could that be the cause here, too? https://github.com/mqttjs/MQTT.js/issues/1268
  • User Properties - MQTT 5.0 New Features
    1 project | dev.to | 22 Sep 2022
    Let's take an example of programming with JavaScript, using the MQTT.js client. We can first specify the version of MQTT as MQTT 5.0 when connecting to the client.
  • Connect to MQTT Broker with Websocket
    1 project | dev.to | 23 Aug 2022
    MQTT.js is a fully open-source client-side library for the MQTT protocol, written in JavaScript and available for Node.js and browsers. On the Node.js side, it can be installed via global installation and connected via the command line. Also, it supports MQTT/TCP, MQTT/TLS, MQTT/WebSocket connections. It is worth mentioning that MQTT.js also has good support for WeChat Mini Program.
  • Any library for mqtt that works ?
    1 project | /r/reactnative | 25 Jul 2022
  • MQTT for Elixir
    4 projects | dev.to | 12 Jul 2022
    using MQTT.js to connect to the broker directly from the frontend through WebSockets.
  • How to Use MQTT in Node.js
    3 projects | dev.to | 14 Jun 2022
    MQTT.js is a client library of the MQTT protocol, written in JavaScript and used in Node.js and browser environments. It is currently the most widely used MQTT client library in the JavaScript ecosystem.

µWebSockets

Posts with mentions or reviews of µWebSockets. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-12-19.

What are some alternatives?

When comparing MQTT.js and µWebSockets you can also consider the following projects:

Aedes - Barebone MQTT broker that can run on any stream server, the node way

Boost.Beast - HTTP and WebSocket built on Boost.Asio in C++11

chartjs-plugin-streaming - Chart.js plugin for live streaming data

libwebsockets - canonical libwebsockets.org networking library

rpc-websockets - JSON-RPC 2.0 implementation over WebSockets for Node.js and JavaScript/TypeScript

WebSocket++ - C++ websocket client/server library

Tasmota - Alternative firmware for ESP8266 and ESP32 based devices with easy configuration using webUI, OTA updates, automation using timers or rules, expandability and entirely local control over MQTT, HTTP, Serial or KNX. Full documentation at

drogon - Drogon: A C++14/17 based HTTP web application framework running on Linux/macOS/Unix/Windows [Moved to: https://github.com/drogonframework/drogon]

mqtt-venstar-bridge - Simple MQTT bridge to the venstar HTTP API

Mongoose - Embedded Web Server

MIMEText - RFC-2822, RFC-2045 and RFC-2049 compliant raw email message generator.