finds.dev

moscajs/mosca

MQTT broker as a module

View on GitHub

★ 3,185JavaScriptupdated Jan 2020

// the take

Mosca is an embeddable Node.js MQTT broker supporting MQTT 3.1/3.1.1 with pluggable backends (MongoDB, Redis, LevelDB, memory). It's explicitly unmaintained — the README tells you to use Aedes instead. Don't adopt this for anything new.

- Embedding story is genuinely good: drop an MQTT broker into any Node.js process with a few lines, useful for testing or lightweight IoT gateways

- Multiple persistence backends for QoS 1 offline queuing gives real flexibility — memory for dev, Redis or Mongo for prod

- WebSocket support alongside raw TCP means browser clients work without extra infrastructure

- Test suite covers persistence adapters with abstract shared specs — the pattern is solid even if the code is old

- Abandoned since 2020 with no QoS 2 support — any IoT use case requiring exactly-once delivery is a dead end here

- Targets Node v4/v6 era; the async model predates modern async/await patterns, making the callback-heavy codebase painful to extend

- The successor (Aedes) exists, is maintained, and is a direct replacement — there is no reason to pick Mosca over it

- MongoDB persistence stores retained messages in a shared pub/sub collection, which becomes a performance problem at any meaningful message volume

We read the README, the directory tree and a key source file in June 2026. Nobody pays to be listed. How we judge →

// at a glance

Stars
3,185
Forks
498
Language
JavaScript
Last commit
31 Jan 2020

// nearby

If mosca isn't quite it.

All repos →