5 ms·
I take it mqtt was developed for embedded systems, microcontrollers etc to be lightweight. Can the broker also run in such and environment, or is that just the
by pletnes 5y ago
I take it mqtt was developed for embedded systems, microcontrollers etc to be lightweight. Can the broker also run in such and environment, or is that just the clients?
- zorr 5y agoMosquitto is C/C++ without any crazy dependencies so you should be able to do that. I don't immediately see why you would do this though? Any specific use cases? I haven't done this myself yet but I've seen a couple of production IoT setups with a local MQTT broker running on a RaspberryPi configured to relay all messages to a central broker running in the cloud.
- jvanderbot 5y agoPi is a far cry from "Microcontrollers". MQTT requires a TCP stack, which limits to the higher end chips. But, for embedded linux, you're probably golden.
- joezydeco 5y agoMQTT is available via LWIP on STM32 parts that don't have an MMU. I've tried it on the STM32F746 (Cortex-M7) and it works well, although there are other issues with networking on CubeMX that are open.
- detaro 5y agoIf you don't need it to scale crazily, yes. E.g. microcontrollers in nodes and then a local gateway as an embedded Linux system would not surprise me to see.
- joezydeco 5y agoI'm running Mosquitto as the central messaging broker on an embedded Linux product right now. It's super lightweight. Running the broker on the target has been a really great thing during development. I can run validation systems on other machines and inject messages over the wire, or I can actually run the UI on my dev machine and let the backend respond from a live target. I also have a development team in Asia that can't get to the newest hardware, so I fire up a system here and open a port they can access. They love it. That said, the bandwidth in MQTT is lightweight but you still need a TCP/IP stack on your system. That's typically more substantial of a footprint than Mosquitto will be at the end of the day.
- ralight 5y agoThe lowest spec device I've come across Mosquitto being used is a 180MHz MIPS processor on 32MB RAM, running Linux. Someone has recently taken the RSMB broker (from IBM originally) and ported it to the ESP32: https://github.com/DynamicDevices/picobroker https://github.com/DynamicDevices/picobroker I can't comment on what the limitations of that are though.