A pure Ruby gem implementing the MQTT protocol for lightweight publish/subscribe messaging, including MQTT-SN support.
ruby-mqtt is a pure Ruby implementation of the MQTT protocol, a lightweight publish/subscribe messaging protocol designed for constrained devices and low-bandwidth networks. It provides a simple API for building MQTT clients and supports both standard MQTT and MQTT-SN (Sensor Networks) packet parsing and generation.
Ruby developers building IoT applications, messaging systems, or custom MQTT clients/servers, particularly those working with sensor networks or environments requiring low-bandwidth communication.
Developers choose ruby-mqtt for its dependency-free pure Ruby implementation, which simplifies integration into Ruby applications, and its dual support for both MQTT and MQTT-SN protocols, offering flexibility for IoT and sensor network use cases.
Pure Ruby gem that implements the MQTT protocol, a lightweight protocol for publish/subscribe messaging.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Implemented purely in Ruby with no external dependencies, making integration straightforward and avoiding conflicts, as highlighted in the 'Pure Ruby Implementation' feature.
Supports both standard MQTT and MQTT-SN protocols, allowing use in IoT and sensor networks without additional libraries, per the README's overview.
Allows connections via URIs, host/port pairs, or attribute hashes, with TLS/SSL and client certificate authentication, as shown in the 'Connecting' section examples.
Provides intuitive methods like publish and subscribe with blocking or looping message reception, demonstrated in the 'Quick Start' and 'Subscribing' sections.
Includes separate APIs for parsing and serializing MQTT and MQTT-SN packets, enabling custom client or server development, as described in the 'Parsing and serialising of packets' section.
The client lacks MQTT QoS level 2 implementation, which is essential for guaranteed exactly-once delivery in reliable messaging systems, as admitted in the 'Limitations' section.
There is no built-in mechanism for reconnecting to the server after disconnections, requiring developers to handle network failures manually, which adds complexity.
Messages are not persisted locally, so in-flight messages may be lost on client disconnect, limiting reliability in unstable network environments, as noted in the 'Limitations'.