On this page
Overview
Eclipse Paho MQTT C is a client library for connecting C applications to MQTT brokers. It provides the classic synchronous MQTTClient API and asynchronous MQTTAsync API with MQTT 5.0/3.1.1 support and transport options including TCP, SSL/TLS, WebSockets, and Unix-domain sockets.
Features and best fit
Based on official documentation; not hands-on tested · Content checked:
Key features
Choose synchronous or asynchronous APIs for the application architecture
The paho-mqtt3c family provides the classic synchronous API while paho-mqtt3a provides the asynchronous API, allowing the client model to match application threading and event flow.
Sources: [1]
Connect over TCP, TLS, WebSockets, or Unix-domain sockets
URI schemes and build options support plain TCP, SSL/TLS, secure and insecure WebSockets, and Unix-domain sockets on supported systems.
Sources: [1]
Best fit
Fits native C applications on Windows, Linux, and macOS that need MQTT connectivity
It is useful for native applications, gateways, and device-side software that need MQTT integrated into an existing event loop or threading architecture.
Sources: [1]
Before adoption
TLS requires both a TLS-enabled build and connection SSL options
Secure transports require building with PAHO_WITH_SSL=TRUE and supplying SSL options when connecting to the broker.
Sources: [1]
The test suite expects an MQTT broker
CMake tests use a broker, defaulting to localhost. Separate compile validation from broker integration tests and explicitly provision an isolated test broker in CI.
Sources: [1]
Official sources
- [1]Paho MQTT C 1.3.16 README(2026-10-04)
- [2]Paho MQTT C 1.3.16 CMake configuration(2026-10-04)
- [3]Paho MQTT C 1.3.16 release(2026-10-04)
- [4]Paho declared project licenses(2026-10-04)
Supplemental curator note
The library is built in synchronous/asynchronous and TLS/non-TLS variants. Choose the link target and transport requirements explicitly; TLS builds require PAHO_WITH_SSL=TRUE and connection-time SSL options. Version 1.3.16 also enables TCP_NODELAY by default and includes connect-latency improvements.
Try it in 3 steps
- 1
Fetch the Paho MQTT C 1.3.16 source
Pin the source checkout to stable v1.3.16.
git clone --depth 1 --branch v1.3.16 https://github.com/eclipse-paho/paho.mqtt.c.git paho-mqtt-c-1.3.16 - 2
Configure a minimal CMake build without TLS or tests
Keep the validation local by avoiding OpenSSL and broker-dependent tests.
cmake -S paho-mqtt-c-1.3.16 -B paho-mqtt-c-1.3.16/build -DPAHO_WITH_SSL=OFF -DPAHO_ENABLE_TESTING=OFF -DPAHO_BUILD_SAMPLES=OFF - 3
Build the synchronous client-library target
Build the classic synchronous shared-library target to validate the C compiler and CMake environment.
cmake --build paho-mqtt-c-1.3.16/build --target paho-mqtt3c
Growth
Growth trends · Last 30 days
2,373 Stars
Trend data is still being collected.
Development activity
Last 90 days · weekly
- Commits (last 30 days)
- 0
- Open PRs
- 58
Development activity is still being collected.
Built with
Categories and tags
Categories
GitHub data
GitHub dataView detailed GitHub data
GitHub Topics
- eclipseiot
- mqtt
- iot
- internet-of-things
- eclipse-paho
- Stars
- 2,373
- Forks
- 1,192
- Watchers
- 111
- Open issues
- 169
- Contributors
- 96
- Owner type
- Organization
- Primary language
- C
- License
- EPL-2.0 OR BSD-3-Clause
- Repository last updated
- Sep 9, 2026
Related information
Write a related articleShare a guide or use case for this OSS in Markdown. Articles are published after administrator approval.
Explore next
- tmux49,629 Stars
2 shared tag(s) · Same language
manage persistent terminal sessions, windows, and panes
C - ImageMagick17,580 Stars
2 shared tag(s) · Same language
turn image conversion, editing, and composition into reproducible CLI/API pipelines
C - Fluent Bit8,130 Stars
2 shared tag(s) · Same language
collect, transform, buffer, and route logs, metrics, and traces
C - GIMP6,468 Stars
2 shared tag(s) · Same language
open-source raster editing with expanded non-destructive workflows in the 3.2 series
C - Home Assistant91,238 Stars
2 shared tag(s)
Unify lights, sensors, appliances, and services into a local-first entity and automation engine
Python - CPython77,417 Stars
2 shared tag(s)
the reference implementation repository for Python, its standard library, build system, and tests
Python
Report incorrect information
Tell us if any listing information is incorrect or outdated.