eclipse-paho/paho.mqtt.c
FreeAn Eclipse Paho C client library for MQTT for Windows, Linux and MacOS. API documentation: https://eclipse-paho.github.io/paho.mqtt.c/
FreeFree tier
About eclipse-paho/paho.mqtt.c
This repository contains the source code for the Eclipse Paho MQTT C client library. It builds libraries that enable applications to connect to an MQTT broker to publish messages, subscribe to topics, and receive published messages. Synchronous and various asynchronous programming models are supported. The library includes four variants: asynchronous with/without SSL/TLS and synchronous with/without SSL/TLS. It supports network protocols: TCP, SSL/TLS, UNIX-domain sockets, and websockets (secure and insecure). MQTT 3.1.1 and 5.0 are supported. Comprehensive API documentation and sample code are provided.
Key Features
Supports MQTT 3.1.1 and 5.0
Synchronous and asynchronous programming models
Four library variants: asynchronous with/without SSL, classic with/without SSL
Network protocols: TCP, SSL/TLS, UNIX-domain sockets, websockets
Cross-platform: Windows, Linux, MacOS
Includes command-line utilities and sample code
Comprehensive API documentation and doxygen docs
Pros & Cons
Pros
- Cross-platform support (Windows, Linux, MacOS)
- Multiple network protocols including websockets
- Supports both MQTT 3.1.1 and 5.0
- Flexible with synchronous and async APIs
- Open source with active community (Eclipse Paho)
- Comprehensive documentation and samples
Cons
- Requires C programming environment and compilation
- No built-in GUI or high-level interface
- Not a standalone application; requires integration into user code
Best For
IoT device communication via MQTTPublish/subscribe messaging in C applicationsBuilding MQTT clients for embedded systemsIntegrating MQTT messaging into cross-platform software
FAQ
What MQTT versions does this library support?
The library supports MQTT 3.1.1 and MQTT 5.0.
What network protocols are supported?
TCP, SSL/TLS, UNIX-domain sockets, and websockets (secure and insecure).
What programming models are available?
Synchronous (MQTTClient) and asynchronous (MQTTAsync) APIs are provided.
Is the library cross-platform?
Yes, it supports Windows, Linux, and MacOS.
Where can I find documentation?
API documentation is available online at https://eclipse-paho.github.io/paho.mqtt.c/ and also in the doc directory via Doxygen.