We are releasing the new MQTT module for MongoDB.
It started with a concrete need in a real project: connect MQTT messages to MongoDB while keeping REST access, live SSE streaming, and custom plugin integration in the same application.
We are releasing the new MQTT module for MongoDB.
During development, one thing became clear. This capability was useful beyond the original project, so we decided to integrate it directly into RESTHeart.
The module connects an MQTT broker to:
- MongoDB, with configurable topics, databases, and collections
- REST APIs for reading the latest available value
- SSE for live message streaming
- Custom plugins through mqtt-router
The beta already includes the operational details that matter in real systems:
- broker acknowledgements after MongoDB persistence
- at-least-once delivery on the storage path
- a bounded buffer for short MongoDB interruptions
- retries and dead-letter files
- topic-level authorization with fail-closed behaviour
- MQTT 3.1.1 and MQTT 5.0 support
The module was born from a specific project. We integrated it into the product because the underlying problem is broader: connecting MQTT data to persistent storage and application interfaces without adding another integration service.
The code and documentation are available here:
https://github.com/SoftInstigate/restheart/tree/master/mqtt
Feedback is especially useful while the module is in beta.
Top comments (0)