OSS Tanbou

connect C applications to MQTT 5.0/3.1.1 brokers through synchronous or asynchronous APIs over TCP, TLS, WebSockets, and Unix sockets

About these scores

OSS scale score is an unbounded metric that log-compresses and weights Stars, Watchers, Forks, and Contributors. Discovery score is the current OSS scale score minus the score at discovery. Update pace is commits in the last 30 days, growth momentum is the OSS scale score difference within the recent observation window, and OSS health is a 0–100 rating based on available recency, Community Health, and release data.

Stars
2,373
Primary language
C
License
EPL-2.0 OR BSD-3-Clause
Repository last updated
Sep 9, 2026
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]

Link explicit CMake targets for shared/static and TLS variants

The CMake package exports targets for async/sync, TLS/non-TLS, and shared/static variants so applications can state the intended dependency precisely.

Sources: [1][2]

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]

1.3.16 enables TCP_NODELAY by default

Version 1.3.16 includes connect-latency improvements, enables TCP_NODELAY by default, and raises the minimum CMake version to 3.12, so latency-sensitive deployments should account for the network-behavior change.

Sources: [3][2]

Official sources

  1. [1]Paho MQTT C 1.3.16 README(2026-10-04)
  2. [2]Paho MQTT C 1.3.16 CMake configuration(2026-10-04)
  3. [3]Paho MQTT C 1.3.16 release(2026-10-04)
  4. [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. 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. 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. 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
Check the official README

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

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
Repository last updated
Sep 9, 2026
Write a related article

Share a guide or use case for this OSS in Markdown. Articles are published after administrator approval.

Report incorrect information

Tell us if any listing information is incorrect or outdated.

After reading this page, do you know what to do next?