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

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

ruanvsoares/laravel-queue-kafka
===============================

Kafka driver for Laravel Queue

1.1(1y ago)01.8k↓100%MITPHPPHP 8.\*

Since Sep 15Pushed 1y agoCompare

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

READMEChangelog (1)Dependencies (5)Versions (3)Used By (0)

Kafka Queue driver for Laravel
==============================

[](#kafka-queue-driver-for-laravel)

[![Latest Stable Version](https://camo.githubusercontent.com/59eb22f25a96c128eede5c0da0ad01d74f42175fa1fc399c4cf27ffb06b9e3ac/68747470733a2f2f706f7365722e707567782e6f72672f7261706964652f6c61726176656c2d71756575652d6b61666b612f762f737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/ruanvsoares/laravel-queue-kafka)[![Build Status](https://camo.githubusercontent.com/d9cdce886fb47884eb5f7094966ac815d33a7ff39a7b056efa48ba3a5f7d8626/68747470733a2f2f7472617669732d63692e6f72672f726170696465696e7465726e65742f6c61726176656c2d71756575652d6b61666b612e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/rapideinternet/laravel-queue-kafka)[![Total Downloads](https://camo.githubusercontent.com/4f1901c73175e5bf1bf80d3e8c4efd7193890f7e62b01f1556fd98987ac0fc2f/68747470733a2f2f706f7365722e707567782e6f72672f7261706964652f6c61726176656c2d71756575652d6b61666b612f646f776e6c6f6164733f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/ruanvsoares/laravel-queue-kafka)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

#### Installation

[](#installation)

1. Install [librdkafka c library](https://github.com/edenhill/librdkafka)

    ```
    $ sudo apt-get install -y librdkafka-dev
    ```
2. Install the [php-rdkafka](https://github.com/arnaud-lb/php-rdkafka) PECL extension

    ```
    $ pecl install rdkafka
    ```
3. a. Add the following to your php.ini file to enable the php-rdkafka extension `extension=rdkafka.so`

    b. Check if rdkafka is installed
    **Note:** If you want to run this on php-fpm restart your php-fpm first.

    ```
    php -i | grep rdkafka

    ```

    Your output should look something like this

    ```
    rdkafka
    rdkafka support => enabled
    librdkafka version (runtime) => 1.0.0-RC2
    librdkafka version (build) => 0.11.4.0

    ```
4. Install this package via composer using:

    ```
     composer require ruanvsoares/laravel-queue-kafka

    ```
5. Add LaravelQueueKafkaServiceProvider to `providers` array in `config/app.php` or in `bootstrap/providers.php`:

    ```
     Rapide\LaravelQueueKafka\LaravelQueueKafkaServiceProvider::class,

    ```
6. Add these properties to `.env` with proper values:

    ```
     QUEUE_DRIVER=kafka

    ```
7. If you want to run a worker for a specific consumer group add to `.env`

    KAFKA\_CONSUMER\_GROUP\_ID="group2"

    Explaination of consumergroups can be found in this article

#### Usage

[](#usage)

Once you completed the configuration you can use Laravel Queue API. If you used other queue drivers you do not need to change anything else. If you do not know how to use Queue API, please refer to the official Laravel documentation:

#### Testing

[](#testing)

Run the tests with:

```
vendor/bin/phpunit
```

#### Acknowledgement

[](#acknowledgement)

This library is inspired by [laravel-queue-rabbitmq](https://github.com/vyuldashev/laravel-queue-rabbitmq) by vyuldashev. And the Kafka implementations by [Superbalist](https://github.com/Superbalist/php-pubsub-kafka) be sure to check those out.

#### Contribution

[](#contribution)

You can contribute to this package by discovering bugs and opening issues. Please, add to which version of package you create pull request or issue.

#### Supported versions of Laravel

[](#supported-versions-of-laravel)

Tested on: \[11.\*\]

Fixes by Ruan Soares
--------------------

[](#fixes-by-ruan-soares)

- Adjust to work with Laravel 11
- Ajust to work with subscribe and commit at consumer, this make the consumer to work with multiple topics and partitions
- Add auto create of default topic
- Fully tested with Laravel 11

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 64% 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 ~1385 days

Total

2

Last Release

680d ago

PHP version history (2 changes)1.0PHP &gt;=5.6.4

1.1PHP 8.\*

### Community

Maintainers

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

---

Top Contributors

[![petermein](https://avatars.githubusercontent.com/u/311652?v=4)](https://github.com/petermein "petermein (32 commits)")[![ruanvsoares](https://avatars.githubusercontent.com/u/171608471?v=4)](https://github.com/ruanvsoares "ruanvsoares (6 commits)")[![Sin30](https://avatars.githubusercontent.com/u/4537407?v=4)](https://github.com/Sin30 "Sin30 (6 commits)")[![L3o-pold](https://avatars.githubusercontent.com/u/4710495?v=4)](https://github.com/L3o-pold "L3o-pold (2 commits)")[![joesb](https://avatars.githubusercontent.com/u/518081?v=4)](https://github.com/joesb "joesb (2 commits)")[![ac1982](https://avatars.githubusercontent.com/u/11901124?v=4)](https://github.com/ac1982 "ac1982 (1 commits)")[![innov8go](https://avatars.githubusercontent.com/u/10679869?v=4)](https://github.com/innov8go "innov8go (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/ruanvsoares-laravel-queue-kafka/health.svg)

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

###  Alternatives

[illuminate/queue

The Illuminate Queue package.

20331.4M1.2k](/packages/illuminate-queue)[palpalani/laravel-sqs-queue-json-reader

Custom SQS queue reader for Laravel

26109.8k](/packages/palpalani-laravel-sqs-queue-json-reader)[rapidez/core

Rapidez Core

1820.7k53](/packages/rapidez-core)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[aplr/kafkaesk

Laravel Kafka queue driver

102.1k](/packages/aplr-kafkaesk)

PHPackages © 2026

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