PHPackages                             diswebru/laravel-kafka-tools - 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. diswebru/laravel-kafka-tools

ActiveLibrary

diswebru/laravel-kafka-tools
============================

tools for mateusjunges/laravel-kafka

1.0.0(1y ago)016MITPHPPHP &gt;=8.2

Since Mar 5Pushed 1y ago1 watchersCompare

[ Source](https://github.com/DisWEBru/laravel-kafka-tools)[ Packagist](https://packagist.org/packages/diswebru/laravel-kafka-tools)[ Docs](https://github.com/DisWEBru/laravel-kafka-tools)[ RSS](/packages/diswebru-laravel-kafka-tools/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

Laravel Kafka tools
===================

[](#laravel-kafka-tools)

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

[](#installation)

```
composer require diswebru/laravel-kafka-tools

```

Examples
--------

[](#examples)

Sending a message to the tests topic

```
use Diswebru\LaravelKafkaTools\Kafka;

Kafka::publish('topic', ['message-key' => 'message-value']);
```

Retrieve unprocessed messages from the tests topic and terminate the process

```
use Diswebru\LaravelKafkaTools\Kafka;

Kafka::consumer('topic', function (ConsumerMessage $message) {
        $data = $message->getBody();

        if (!isset($data['message-key']) && $data['message-key'] != 'message-value') {
            // There will be no commit
            throw new \Exception('Error message');
        }
    });
```

Retrieve unprocessed messages from the tests topic and terminate the process using mateusjunges/laravel-kafka

```
use Diswebru\LaravelKafkaTools\Infrastructure\Factories\ManuallyCommitterFactory;
use Junges\Kafka\Contracts\ConsumerMessage;
use Junges\Kafka\Facades\Kafka;

Kafka::consumer()
    ->subscribe('topic')
    ->withOptions([
        'enable.auto.commit' => 'false',
        'auto.offset.reset' => 'earliest'
    ])
    ->stopAfterLastMessage()
    ->usingCommitterFactory(new ManuallyCommitterFactory())
    ->withHandler(function (ConsumerMessage $message) {
        $data = $message->getBody();

        if (!isset($data['message-key']) && $data['message-key'] != 'message-value') {
            // There will be no commit
            throw new \Exception('Error message');
        }
    })
    ->build()
    ->consume();
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance45

Moderate activity, may be stable

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

433d ago

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/diswebru-laravel-kafka-tools/health.svg)

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

PHPackages © 2026

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