The MQTT client for Node.js and the browser
MQTT.js is a client library for the MQTT protocol written in JavaScript that works with both Node.js and browser environments. The project handles real-time messaging across various transport protocols including TCP, TLS, WebSocket, and Unix sockets, with built-in support for automatic reconnection, QoS flow management, and MQTT 5 features. It is written in TypeScript and can be installed via npm, with examples provided for frameworks like Vue 3 with Vite and React Native, along with command-line tools for subscribing and publishing to brokers.