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

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

lupennat/phpkafka
=================

A kafka client. Support php-fpm and Swoole.

v1.2.6(1y ago)03Apache-2.0PHPPHP &gt;=7.1

Since Nov 9Pushed 1y agoCompare

[ Source](https://github.com/Lupennat/phpkafka)[ Packagist](https://packagist.org/packages/lupennat/phpkafka)[ RSS](/packages/lupennat-phpkafka/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (9)Versions (17)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

30

—

LowBetter than 64% of packages

Maintenance38

Infrequent updates — may be unmaintained

Popularity3

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity57

Maturing project, gaining track record

 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

Every ~104 days

Recently: every ~150 days

Total

15

Last Release

559d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3cea30d9041841dbfc768dc8b690c0cf4fb3244073f9edaf08f9c8f9d04f470a?d=identicon)[lupennat](/maintainers/lupennat)

---

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)")[![Lupennat](https://avatars.githubusercontent.com/u/6160171?v=4)](https://github.com/Lupennat "Lupennat (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/lupennat-phpkafka/health.svg)

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

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[longlang/phpkafka

A kafka client. Support php-fpm and Swoole.

2792.4M12](/packages/longlang-phpkafka)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78026.4M414](/packages/react-http)[php-http/curl-client

PSR-18 and HTTPlug Async client with cURL

48347.0M384](/packages/php-http-curl-client)

PHPackages © 2026

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