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

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

jeckerson/phpkafka
==================

A kafka client. Support php-fpm and Swoole.

013.5k↓58.3%PHP

Since Oct 3Pushed 2y agoCompare

[ Source](https://github.com/Jeckerson/phpkafka)[ Packagist](https://packagist.org/packages/jeckerson/phpkafka)[ RSS](/packages/jeckerson-phpkafka/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependenciesVersions (1)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

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity21

Early-stage or recently created project

 Bus Factor1

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

### Community

Maintainers

![](https://www.gravatar.com/avatar/d5ff591be4c323fa518af7afa942b4b1423ce4bd3991e9d9b3fc1b3878cfea75?d=identicon)[Jeckerson](/maintainers/Jeckerson)

---

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)")[![Jeckerson](https://avatars.githubusercontent.com/u/3289702?v=4)](https://github.com/Jeckerson "Jeckerson (5 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)")[![dygin](https://avatars.githubusercontent.com/u/72969862?v=4)](https://github.com/dygin "dygin (1 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)")

### Embed Badge

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

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

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25126.1M82](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.9M6.9k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k24.3k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87965.9k114](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.4M92](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69127.2k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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