PHPackages                             i2soft/phpkafka - 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. i2soft/phpkafka

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

i2soft/phpkafka
===============

A kafka client. Support php-fpm and Swoole.

v1.2.6(1y ago)04.0k↓41%Apache-2.0PHPPHP &gt;=7.1

Since Oct 30Pushed 1y agoCompare

[ Source](https://github.com/info2soft/phpkafka)[ Packagist](https://packagist.org/packages/i2soft/phpkafka)[ RSS](/packages/i2soft-phpkafka/feed)WikiDiscussions prod Synced yesterday

READMEChangelog (1)Dependencies (9)Versions (3)Used By (0)

longlang/phpkafka
=================

[](#longlangphpkafka)

[![Latest Version](https://camo.githubusercontent.com/7766d983734dd7a289203ac43cc765655ccb3f25edd7bb669da01942c4c33a38/68747470733a2f2f706f7365722e707567782e6f72672f6c6f6e676c616e672f7068706b61666b612f762f737461626c65)](https://packagist.org/packages/longlang/phpkafka)[![Php Version](https://camo.githubusercontent.com/315f5c30e505b9ccc4178451bbd34c2ba5d281d1fa3267304053ed19ab634125/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d2533453d372e312d627269676874677265656e2e737667)](https://secure.php.net/)[![License](https://camo.githubusercontent.com/34decf87d70b3a87b79c71fa01915bb9ef6c9553fca5c51b929b46e446787425/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6c6f6e6779616e2f7068706b61666b612e737667)](https://github.com/longyan/phpkafka/blob/master/LICENSE)

Introduction
------------

[](#introduction)

English | [简体中文](README.cn.md)

PHP Kafka client is used in PHP-FPM and Swoole.

The communication protocol is based on the JSON file in Java. PHP Kafka client supports 50 APIs, which might be one that supports the most message types ever.

> The produce and the consume of messages are implemented. The component is in developing and testing.

Features
--------

[](#features)

- Support all 50 APIs
- Message compression
- PHP-FPM and Swoole compatible
- Producer
- Consumer
- SASL
- SSL
- More features and test cases

Environment
-----------

[](#environment)

- PHP &gt;= 7.1
- Kafka &gt;= 1.0.0
- Swoole &gt;= 4.5 (optional)

Installation
------------

[](#installation)

`composer require longlang/phpkafka`

Documentation and Examples
--------------------------

[](#documentation-and-examples)

- [Producer](doc/producer.en.md)
- [Consumer](doc/consumer.en.md)

Refer to `examples` for code examples.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance35

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 Bus Factor1

Top contributor holds 76.7% 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

Unknown

Total

1

Last Release

611d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/557141c6a6881433c99246cc99a4eb71377c3ca24e047a7c597b94d29c0369a3?d=identicon)[info2soft](/maintainers/info2soft)

---

Top Contributors

[![Yurunsoft](https://avatars.githubusercontent.com/u/20104656?v=4)](https://github.com/Yurunsoft "Yurunsoft (89 commits)")[![limingxinleo](https://avatars.githubusercontent.com/u/16648551?v=4)](https://github.com/limingxinleo "limingxinleo (6 commits)")[![PandaLIU-1111](https://avatars.githubusercontent.com/u/26201936?v=4)](https://github.com/PandaLIU-1111 "PandaLIU-1111 (4 commits)")[![reneeteng](https://avatars.githubusercontent.com/u/16800727?v=4)](https://github.com/reneeteng "reneeteng (4 commits)")[![leocavalcante](https://avatars.githubusercontent.com/u/183722?v=4)](https://github.com/leocavalcante "leocavalcante (3 commits)")[![qiqizjl](https://avatars.githubusercontent.com/u/7540584?v=4)](https://github.com/qiqizjl "qiqizjl (2 commits)")[![huangdijia](https://avatars.githubusercontent.com/u/8337659?v=4)](https://github.com/huangdijia "huangdijia (2 commits)")[![info2soft](https://avatars.githubusercontent.com/u/7940721?v=4)](https://github.com/info2soft "info2soft (2 commits)")[![Reasno](https://avatars.githubusercontent.com/u/3881629?v=4)](https://github.com/Reasno "Reasno (1 commits)")[![sy-records](https://avatars.githubusercontent.com/u/33931153?v=4)](https://github.com/sy-records "sy-records (1 commits)")[![szutoutou](https://avatars.githubusercontent.com/u/17758819?v=4)](https://github.com/szutoutou "szutoutou (1 commits)")[![dygin](https://avatars.githubusercontent.com/u/72969862?v=4)](https://github.com/dygin "dygin (1 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/i2soft-phpkafka/health.svg)

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

###  Alternatives

[composer/composer

Composer helps you declare, manage and install dependencies of PHP projects. It ensures you have the right stack everywhere.

29.5k196.2M3.1k](/packages/composer-composer)[friendsofphp/php-cs-fixer

A tool to automatically fix PHP code style

13.5k251.2M25.2k](/packages/friendsofphp-php-cs-fixer)[longlang/phpkafka

A kafka client. Support php-fpm and Swoole.

2802.6M16](/packages/longlang-phpkafka)[getgrav/grav

Modern, Crazy Fast, Ridiculously Easy and Amazingly Powerful Flat-File CMS

15.6k86.4k1](/packages/getgrav-grav)[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25126.1M82](/packages/php-http-cache-plugin)[ssch/typo3-rector

Instant fixes for your TYPO3 PHP code by using Rector.

2603.2M436](/packages/ssch-typo3-rector)

PHPackages © 2026

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