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

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

larva/laravel-queue-kafka
=========================

This is a Laravel queue adapter for the Kafka.

1.0.0(5y ago)11.0k[1 issues](https://github.com/larvatecn/laravel-queue-kafka/issues)MITPHP

Since Mar 6Pushed 5y agoCompare

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

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

laravel-queue-kafka
===================

[](#laravel-queue-kafka)

This is a queue adapter for the Kafka. 修改自

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

[](#installation)

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

for Laravel
-----------

[](#for-laravel)

This service provider must be registered.

```
// config/app.php

'providers' => [
    '...',
    Larva\Queue\Kafka\KafkaServiceProvider::class,
];
```

edit the config file: config/queue.php

add config

```
        'kafka' => [
            /*
             * Driver name
             */
            'driver' => 'kafka',
            /*
             * The name of default queue.
             */
            'queue' => env('KAFKA_QUEUE', 'default'),
            /*
             * The group of where the consumer in resides.
             */
            'consumer_group_id' => env('KAFKA_CONSUMER_GROUP_ID', 'laravel_queue'),
            /*
             * Address of the Kafka broker
             */
            'brokers' => env('KAFKA_BROKERS', 'localhost'),
            /*
             * Determine the number of seconds to sleep if there's an error communicating with kafka
             * If set to false, it'll throw an exception rather than doing the sleep for X seconds.
             */
            'sleep_on_error' => env('KAFKA_ERROR_SLEEP', 5),
            /*
             * Sleep when a deadlock is detected
             */
            'sleep_on_deadlock' => env('KAFKA_DEADLOCK_SLEEP', 2),

            /*
             * 全局默认配置
             */
            'defaultConf' => [
                'enable.auto.commit' => 'false',
                'offset.store.method' => 'broker',
                //'security.protocol' => 'SASL_SSL',
                //'sasl.mechanisms' => 'PLAIN',
                //'sasl.username' => '',
                //'sasl.password' => '',
                //'ssl.ca.location' => '/ca-cert.pem',
            ]
        ],
```

change default to mns

```
    'default' => 'kafka'
```

Use
---

[](#use)

see [Laravel wiki](https://laravel.com/docs/5.7/queues)

###  Health Score

21

—

LowBetter than 19% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

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

1890d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/534cdb651e8c806590fa945c6b5a18f361613848e890db1349f4a9fbcae1a650?d=identicon)[xutongle](/maintainers/xutongle)

---

Tags

laravelqueuekafka

### Embed Badge

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

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

###  Alternatives

[imtigger/laravel-job-status

Laravel Job Status

5272.1M2](/packages/imtigger-laravel-job-status)

PHPackages © 2026

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