A portable MQTT v3.1.1 client library written in ANSI C for embedded systems and PCs.
MQTT-C is an open-source MQTT client library written in ANSI C that implements the MQTT v3.1.1 protocol. It provides a portable solution for connecting embedded systems and PCs to MQTT brokers, enabling lightweight publisher-subscriber messaging in IoT and networking applications. The library addresses the need for a small, thread-safe MQTT client that can run on resource-constrained devices.
Embedded systems developers and C programmers working on IoT projects, microcontrollers, or applications requiring MQTT communication in constrained environments.
Developers choose MQTT-C for its minimal footprint, ANSI C compatibility, and transparent Platform Abstraction Layer that simplifies porting. It offers a fully thread-safe design while maintaining efficiency for single-threaded systems, making it uniquely suited for embedded development.
A portable MQTT C client for embedded systems and PCs alike.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
With only two source files and less than 2000 lines, integration is straightforward and footprint is small, ideal for embedded systems.
Written in C89, it compiles with any C compiler, ensuring broad portability across legacy and modern systems.
Fully thread-safe while efficient on single-threaded systems, making it versatile for various application architectures.
The Platform Abstraction Layer simplifies porting to new platforms, as highlighted in the documentation for easy adaptation.
Implements the full MQTT v3.1.1 protocol, providing reliable messaging features for IoT applications.
Does not support MQTT v5 features such as improved error codes or user properties, which may be limiting for modern applications.
Lacks built-in TLS/SSL support, necessitating additional libraries or custom implementation for secure MQTT connections.
Missing automatic reconnection and session management, common in more feature-rich clients, shifting burden to the developer.
Unit tests depend on the cmocka framework, adding complexity to development and testing workflows compared to self-contained solutions.