PHPackages                             muxtorov98/yii2-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. muxtorov98/yii2-kafka

ActiveYii2-extension[Queues &amp; Workers](/categories/queues)

muxtorov98/yii2-kafka
=====================

Kafka integration for Yii2 with full worker auto discovery &amp; retry support.

v1.1.2(2mo ago)110MITPHPPHP ^8.2

Since Oct 25Pushed 2mo agoCompare

[ Source](https://github.com/Muxtorov98/yii2-kafka)[ Packagist](https://packagist.org/packages/muxtorov98/yii2-kafka)[ RSS](/packages/muxtorov98-yii2-kafka/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (4)Versions (14)Used By (0)

yii2-kafka
==========

[](#yii2-kafka)

Kafka integration for Yii2 with:

- handler auto-discovery
- topic + group based worker forking
- retry on handler failure
- DLQ publishing for failed messages
- PSR-3 logger support
- in-memory metrics counters
- idempotent handler contract
- graceful shutdown
- safer producer flush handling

Package: `muxtorov98/yii2-kafka`

Requirements
------------

[](#requirements)

- PHP `^8.2`
- Yii2 `^2.0`
- `ext-rdkafka`
- `ext-pcntl`

Install
-------

[](#install)

```
composer require muxtorov98/yii2-kafka
```

Docker extensions
-----------------

[](#docker-extensions)

```
RUN pecl install rdkafka \
    && docker-php-ext-enable rdkafka \
    && docker-php-ext-install pcntl
```

Config
------

[](#config)

Create `common/config/kafka.php`

```
