PHPackages                             zhizhong/kafka - 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. zhizhong/kafka

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

zhizhong/kafka
==============

help to use kafka in laravel

08.4kPHP

Since Jun 26Pushed 7y agoCompare

[ Source](https://github.com/leon19910505/kafka)[ Packagist](https://packagist.org/packages/zhizhong/kafka)[ RSS](/packages/zhizhong-kafka/feed)WikiDiscussions master Synced 3w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Install
-------

[](#install)

```
composer require zhizhong/kafka:dev-master

```

Config
------

[](#config)

set kafka brokers routes in your env ,it can be a list by string

```
KAFKA_BROKERS=127.0.0.1:2086,127.0.0.2:2086

```

Usage
-----

[](#usage)

#### Producer

[](#producer)

the easy way to produce is use help function **kafka\_dispatch**

```
kafka_dispatch($topic, $msg)

```

> **Note:** $msg must be an array

#### Consumer

[](#consumer)

```
$consumer = new Consumer($topic);
while (true) {
    $msg = $consumer->consume();
    print_r($msg);
}
```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% 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://avatars.githubusercontent.com/u/26701373?v=4)[leon19910505](/maintainers/leon19910505)[@leon19910505](https://github.com/leon19910505)

---

Top Contributors

[![leon19910505](https://avatars.githubusercontent.com/u/26701373?v=4)](https://github.com/leon19910505 "leon19910505 (2 commits)")

### Embed Badge

![Health badge](/badges/zhizhong-kafka/health.svg)

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

###  Alternatives

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25025.5M80](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.2M6.5k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k20.0k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

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

87930.4k113](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.3M84](/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

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

PHPackages © 2026

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