A pure-Lua MQTT client library supporting both v3.1.1 and v5.0 protocols for maximum portability.
luamqtt is a pure-Lua implementation of an MQTT client library that supports both MQTT v3.1.1 and v5.0 protocols. It provides a lightweight, portable way for Lua applications to communicate using the publish/subscribe model, enabling messaging for IoT devices, networked services, and embedded systems without external C dependencies.
Lua developers building IoT applications, networked tools, or embedded systems that require MQTT communication, especially those needing cross-platform compatibility across Lua 5.1–5.4, LuaJIT, or Windows environments.
Developers choose luamqtt for its pure-Lua design, which ensures maximum portability and ease of integration without sacrificing full MQTT protocol support. Its minimal dependencies, customizable connectors, and ability to run multiple clients concurrently make it a flexible choice for Lua-based messaging solutions.
luamqtt - Pure-lua MQTT v3.1.1 and v5.0 client
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Written entirely in Lua with no C dependencies, ensuring it runs on Lua 5.1 through 5.4, LuaJIT, and Windows, as tested and documented in the README.
Implements both MQTT v3.1.1 and v5.0 with all control packets, making it feature-complete for modern IoT and messaging standards.
Uses an IOLoop to run multiple long-living MQTT clients in a single script, enabling efficient multi-client applications as highlighted in the features.
Includes built-in connectors for luasocket, SSL/TLS via luasec, and OpenResty, with the ability to implement custom network layers, providing adaptability.
Requires separate installation of luasocket, luabitop for Lua 5.1, and luasec for SSL, which the README notes can be non-trivial, especially on Windows.
Being pure Lua, it may not match the speed and efficiency of C-based MQTT clients, potentially affecting high-performance or latency-sensitive use cases.
As a Lua-specific library, it has a smaller community and fewer resources compared to mainstream MQTT libraries in languages like Python or JavaScript.