PHPackages                             rapide/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. rapide/laravel-queue-kafka

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

rapide/laravel-queue-kafka
==========================

Kafka driver for Laravel Queue

1.0(7y ago)16817.2k↓37.1%57[10 issues](https://github.com/rapideinternet/laravel-queue-kafka/issues)[4 PRs](https://github.com/rapideinternet/laravel-queue-kafka/pulls)MITPHPPHP &gt;=5.6.4CI failing

Since Aug 4Pushed 2y ago7 watchersCompare

[ Source](https://github.com/rapideinternet/laravel-queue-kafka)[ Packagist](https://packagist.org/packages/rapide/laravel-queue-kafka)[ RSS](/packages/rapide-laravel-queue-kafka/feed)WikiDiscussions master Synced yesterday

READMEChangelog (6)Dependencies (5)Versions (8)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/rapide/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/rapide/laravel-queue-kafka)[![StyleCI](https://camo.githubusercontent.com/720ddf2920215a91f3582cd9bde251575670c884e6f466b10ca236785726ccea/68747470733a2f2f7374796c6563692e696f2f7265706f732f39393234393738332f736869656c64)](https://styleci.io/repos/99249783)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE)

#### Installation

[](#installation)

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

    ```
    $ cd /tmp
    $ mkdir librdkafka
    $ cd librdkafka
    $ git clone https://github.com/edenhill/librdkafka.git .
    $ ./configure
    $ make
    $ make install
    ```
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 rapide/laravel-queue-kafka

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

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

    ```

    If you are using Lumen, put this in `bootstrap/app.php`

    ```
     $app->register(Rapide\LaravelQueueKafka\LumenQueueKafkaServiceProvider::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

    ```
     export KAFKA_CONSUMER_GROUP_ID="group2" && php artisan queue:work --sleep=3 --tries=3

    ```

    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: \[5.4, 5.5, 5.6, 5.7\]

#### New version is underway

[](#new-version-is-underway)

A version for Laravel 6,7,8 is underway. Also supporting the new RdKafka library

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity45

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 72.7% 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 ~154 days

Total

4

Last Release

2792d ago

Major Versions

0.3.0 → 1.02018-11-10

### Community

Maintainers

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

---

Top Contributors

[![petermein](https://avatars.githubusercontent.com/u/311652?v=4)](https://github.com/petermein "petermein (32 commits)")[![Sin30](https://avatars.githubusercontent.com/u/4537407?v=4)](https://github.com/Sin30 "Sin30 (6 commits)")[![joesb](https://avatars.githubusercontent.com/u/518081?v=4)](https://github.com/joesb "joesb (2 commits)")[![L3o-pold](https://avatars.githubusercontent.com/u/4710495?v=4)](https://github.com/L3o-pold "L3o-pold (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)")

---

Tags

laravelqueue-drivers

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[laravel/scout

Laravel Scout provides a driver based solution to searching your Eloquent models.

1.7k55.0M619](/packages/laravel-scout)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M131](/packages/laravel-pulse)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[illuminate/queue

The Illuminate Queue package.

21332.6M1.6k](/packages/illuminate-queue)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M131](/packages/roots-acorn)[flarum/core

Delightfully simple forum software.

201.4M2.3k](/packages/flarum-core)

PHPackages © 2026

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