PHPackages                             s008nyx/kafka-bus - 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. [API Development](/categories/api)
4. /
5. s008nyx/kafka-bus

ActiveLibrary[API Development](/categories/api)

s008nyx/kafka-bus
=================

Kafka bus integration to Laravel/Lumen

0.2.1(4y ago)187MITPHPPHP ^7.2 || ^8.0

Since Oct 13Pushed 4y ago1 watchersCompare

[ Source](https://github.com/s008nyx/kafka-bus)[ Packagist](https://packagist.org/packages/s008nyx/kafka-bus)[ RSS](/packages/s008nyx-kafka-bus/feed)WikiDiscussions master Synced yesterday

READMEChangelog (5)Dependencies (5)Versions (6)Used By (0)

kafka-bus
=========

[](#kafka-bus)

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

[](#installation)

### Install package

[](#install-package)

```
composer require s008nyx/kafka-bus

```

### For Lumen

[](#for-lumen)

Open your `bootstrap/app.php` file and:

- add this line before `Register Container Bindings` section:

```
     $app->configure('kafka-bus');
```

- add this line in `Register Service Providers` section:

```
    $app->register(\KafkaBus\KafkaBusServiceProvider::class);
```

### Add environment variables

[](#add-environment-variables)

```
KAFKA_BROKERS="kafka-node01:9093,kafka-node02:9093"
KAFKA_AUTOCOMMIT=true
KAFKA_GROUP_ID="myGroup"
KAFKA_SECURITY_PROTOCOL=SASL_SSL
KAFKA_SASL_MECHANISMS=SCRAM-SHA-512
KAFKA_SASL_PASSWORD=password
KAFKA_SASL_USERNAME=username
KAFKA_SSL_CA_LOCATION=/path/to/ca.crt
KAFKA_SSL_CERTIFICATE_LOCATION=/path/to/chain.crt
```

Usage
-----

[](#usage)

### Create Handler

[](#create-handler)

MyHandler.php

```
