PHPackages                             iankibet/shkafka - 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. [Queues &amp; Workers](/categories/queues)
4. /
5. iankibet/shkafka

ActiveLibrary[Queues &amp; Workers](/categories/queues)

iankibet/shkafka
================

Laravel kafka topic listener

01.7kPHP

Since Dec 8Pushed 2y ago1 watchersCompare

[ Source](https://github.com/iankibet/shkafka)[ Packagist](https://packagist.org/packages/iankibet/shkafka)[ RSS](/packages/iankibet-shkafka/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

ShKafka
=======

[](#shkafka)

A simple Kafka client for laravel.

One can listen to a topic and consume messages from it.

One can also produce messages to a topic.

To install the package, run the following command in your terminal

```
composer require iankibet/shkafka
```

Publish Config
--------------

[](#publish-config)

```
php artisan vendor:publish --provider="Iankibet\Shkafka\ShKafkaServiceProvider"
```

Usage
-----

[](#usage)

Once installed and config published, you can use the package by adding the following to your .env file

You can get the values from your kafka cluster

If you need a free kafka cluster, you can get one from [upstash.com](https://upstash.com/)

```
KAFKA_BROKERS=
KAFKA_SASL_PLAIN_USERNAME=
KAFKA_SASL_PLAIN_PASSWORD=
```

To listen to a topic, start by creating a job for the topic you want to listen to.

For example, if you want to listen to a topic called "test", create a job called TestJob

Then go to shkafka.php config file and add the following to the topics array

You can add as many topics as you want in the array

```
'test' => [
            \App\Jobs\TestJob::class,
        ],
```

Then run the following command in your terminal

```
php artisan shkafka:listen
```

When a new message is published to the topic, the job will be dispatched.

To produce a message to a topic, use the following code

```
KafkaRepository::produce('test', [
            'message' => 'test message',
]);
```

###  Health Score

17

—

LowBetter than 6% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity20

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://www.gravatar.com/avatar/d0a938e18a864899b0a7963fc0e63d48be5d7ec5ecc5543ff9423bf85905ba4f?d=identicon)[ictianspecialist](/maintainers/ictianspecialist)

---

Top Contributors

[![iankibet](https://avatars.githubusercontent.com/u/10730525?v=4)](https://github.com/iankibet "iankibet (1 commits)")

### Embed Badge

![Health badge](/badges/iankibet-shkafka/health.svg)

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

###  Alternatives

[league/geotools

Geo-related tools PHP 7.3+ library

1.4k5.3M26](/packages/league-geotools)[amphp/parser

A generator parser to make streaming parsers simple.

14952.8M16](/packages/amphp-parser)[amphp/serialization

Serialization tools for IPC and data storage in PHP.

13451.1M18](/packages/amphp-serialization)[enqueue/enqueue

Message Queue Library

19820.0M56](/packages/enqueue-enqueue)[deliciousbrains/wp-background-processing

WP Background Processing can be used to fire off non-blocking asynchronous requests or as a background processing tool, allowing you to queue tasks.

1.1k409.8k6](/packages/deliciousbrains-wp-background-processing)[react/async

Async utilities and fibers for ReactPHP

2238.8M171](/packages/react-async)

PHPackages © 2026

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