eclipse/paho.mqtt.c
FreeAn Eclipse Paho C client library for MQTT for Windows, Linux and MacOS. API documentation: https://eclipse.github.io/paho.mqtt.c/
About eclipse/paho.mqtt.c
Eclipse Paho MQTT C client library provides a robust implementation of the MQTT protocol for C applications. It supports both synchronous and asynchronous programming models, enabling flexible publish/subscribe messaging with MQTT brokers. The library is available in four variants: paho-mqtt3a (asynchronous without SSL), paho-mqtt3as (asynchronous with SSL/TLS), paho-mqtt3c (classic synchronous), and paho-mqtt3cs (classic with SSL/TLS). Network protocol support includes TCP, SSL/TLS, Unix-domain sockets, and websockets (secure and insecure). The library is designed for cross-platform use on Windows, Linux, and macOS. Comprehensive API documentation is generated via Doxygen, and sample code (e.g., command-line utilities paho_c_pub, paho_c_sub) demonstrates usage. It adheres to MQTT 3.1.1 and 5.0 standards.
Key Features
Pros & Cons
- Open source with Eclipse governance and permissive licensing (EPL 2.0)
- Multiple API models (sync and async) to match different application needs
- Extensive network protocol support including websockets and Unix sockets
- Good documentation with samples and detailed API references
- Active community and long history of maintenance
- Supports both MQTT 3.1.1 and 5.0 standards
- C language only; no native C++ wrapper (requires C programming)
- Manual memory management required, increasing development complexity
- Low-level library; may be less approachable for beginners than higher-level MQTT clients
- No built-in MQTT broker or client GUI; only provides client library