PHPackages                             simps/mqtt - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. simps/mqtt

ActiveLibrary[HTTP &amp; Networking](/categories/http)

simps/mqtt
==========

MQTT Protocol Analysis and Coroutine Client for PHP

v2.0.1(7mo ago)39859.9k—5.6%617Apache-2.0PHPPHP &gt;=7.1CI passing

Since Nov 17Pushed 3w ago9 watchersCompare

[ Source](https://github.com/simps/mqtt)[ Packagist](https://packagist.org/packages/simps/mqtt)[ GitHub Sponsors](https://github.com/sy-records)[ RSS](/packages/simps-mqtt/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (10)Dependencies (5)Versions (32)Used By (7)

English | [中文](./README-CN.md)

MQTT Protocol Analysis &amp; Coroutine Client
=============================================

[](#mqtt-protocol-analysis--coroutine-client)

MQTT Protocol Analysis and Coroutine Client for PHP.

Support for MQTT protocol versions `3.1`, `3.1.1` and `5.0`.

Support for `QoS 0`, `QoS 1`, `QoS 2`.

Support for MQTT over WebSocket.

Important

The first PHP library to support the MQTT `5.0` protocol.

[![License](https://camo.githubusercontent.com/38338c1361fc56b99191ac0771a105362cb0d510dce2148dfb844fc715f35e0c/68747470733a2f2f706f7365722e707567782e6f72672f73696d70732f6d7174742f6c6963656e7365)](LICENSE)[![Latest Stable Version](https://camo.githubusercontent.com/aa66d4ffcf7c2d7d3942967744287f555375be31a0c7dc4ac81b71b1766a0ea1/68747470733a2f2f706f7365722e707567782e6f72672f73696d70732f6d7174742f76)](//packagist.org/packages/simps/mqtt)[![Total Downloads](https://camo.githubusercontent.com/71cb9558b32fe33368c809471366ae3a005131fe89b0fbfb1152806dcdabc44f/68747470733a2f2f706f7365722e707567782e6f72672f73696d70732f6d7174742f646f776e6c6f616473)](//packagist.org/packages/simps/mqtt)[![PHP Version](https://camo.githubusercontent.com/ef76a1dea5f711ae44e3e93656e026140d41a611f4a277d407851881319d8412/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2533453d372e312d626c75652e737667)](https://www.php.net)[![Swoole Version](https://camo.githubusercontent.com/991a3692238238521ff36e6dfdb2779f292a49355666c593536cf1352187e6e2/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73776f6f6c652d2533453d342e342e32302d626c75652e737667)](https://github.com/swoole/swoole-src)

[![PHPUnit for MQTT](https://github.com/simps/mqtt/actions/workflows/test.yml/badge.svg)](https://github.com/simps/mqtt/actions/workflows/test.yml)[![Static Code Analysis](https://github.com/simps/mqtt/actions/workflows/phpstan.yml/badge.svg)](https://github.com/simps/mqtt/actions/workflows/phpstan.yml)[![Gitee Star](https://camo.githubusercontent.com/5598ca6f9380c255c4fce46fbf59e6ad338b68d501c987c2cb43f4f44e7897c4/68747470733a2f2f67697465652e636f6d2f7068706d7174742f6d7174742f62616467652f737461722e7376673f7468656d653d6461726b)](https://gitee.com/phpmqtt/mqtt/stargazers)[![GitCode Star](https://camo.githubusercontent.com/50fb6781b3eaec025f613ab154272eb6cdb339cc6d285f7a459053b559edff3c/68747470733a2f2f676974636f64652e636f6d2f73696d70732f6d7174742f737461722f62616467652e737667)](https://gitcode.com/simps/mqtt/stargazers)[![MQTT 交流群](https://camo.githubusercontent.com/c268e0ec922d2b4b6a1c7fd7ab54f80347455a4292235bd457bfe075822e8f14/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f51512545372542452541342d3938333637393934352d6f72616e6765)](https://go.qq52o.me/qm/mqtt)

Install
-------

[](#install)

```
composer require simps/mqtt
```

Documentation
-------------

[](#documentation)

[mqtt.simps.io](https://mqtt.simps.io/#/en/) | [MQTT 3.1.1](http://docs.oasis-open.org/mqtt/mqtt/v3.1.1/mqtt-v3.1.1.html) | [MQTT 5.0](https://docs.oasis-open.org/mqtt/mqtt/v5.0/os/mqtt-v5.0-os.html)

Examples
--------

[](#examples)

see [examples](./examples)

###  Health Score

59

—

FairBetter than 98% of packages

Maintenance82

Actively maintained with recent releases

Popularity52

Moderate usage in the ecosystem

Community32

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 97.5% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~65 days

Recently: every ~127 days

Total

30

Last Release

214d ago

Major Versions

1.x-dev → v2.0.02025-01-20

PHP version history (2 changes)v1.0.0PHP &gt;=7.0

v1.2.0PHP &gt;=7.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/17615e789eec7042f64c6f4e8733421987d98fcdc4269395b42d2a7f0ae94301?d=identicon)[sy-records](/maintainers/sy-records)

---

Top Contributors

[![sy-records](https://avatars.githubusercontent.com/u/33931153?v=4)](https://github.com/sy-records "sy-records (270 commits)")[![bingcool](https://avatars.githubusercontent.com/u/12829386?v=4)](https://github.com/bingcool "bingcool (2 commits)")[![ar026](https://avatars.githubusercontent.com/u/24467915?v=4)](https://github.com/ar026 "ar026 (1 commits)")[![Yurunsoft](https://avatars.githubusercontent.com/u/20104656?v=4)](https://github.com/Yurunsoft "Yurunsoft (1 commits)")[![zoujingli](https://avatars.githubusercontent.com/u/4349951?v=4)](https://github.com/zoujingli "zoujingli (1 commits)")[![liutaot](https://avatars.githubusercontent.com/u/16320567?v=4)](https://github.com/liutaot "liutaot (1 commits)")[![huanghantao](https://avatars.githubusercontent.com/u/22836925?v=4)](https://github.com/huanghantao "huanghantao (1 commits)")

---

Tags

mqttmqtt-clientmqtt-protocolmqtt-websocketmqtt3mqtt5phpswoolewebsocketphpclientswoolecoroutinemqttsimpsmqtt\_clientmqtt\_protocolmqtt3.1mqtt5.0

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/simps-mqtt/health.svg)

```
[![Health](https://phpackages.com/badges/simps-mqtt/health.svg)](https://phpackages.com/packages/simps-mqtt)
```

###  Alternatives

[swlib/saber

Swoole coroutine HTTP client

981151.2k31](/packages/swlib-saber)[hyperf/hyperf

A coroutine framework that focuses on hyperspeed and flexibility. Building microservice or middleware with ease.

6.9k3.5k2](/packages/hyperf-hyperf)[workerman/mqtt

21855.5k12](/packages/workerman-mqtt)[simple-swoole/simps

A simple, lightweight and high-performance PHP coroutine framework.

4778.1k3](/packages/simple-swoole-simps)[swoole/grpc

Grpc PHP Client base on Swoole Http2 Coroutine

19720.2k1](/packages/swoole-grpc)[swoole/etcd-client

Grpc PHP Client base on Swoole Http2 Coroutine

1973.3k1](/packages/swoole-etcd-client)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
