PHPackages                             arquivei/php-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. arquivei/php-kafka

ActiveLibrary

arquivei/php-kafka
==================

PHP Kafka Client

v0.1-alpha(5y ago)631[1 PRs](https://github.com/arquivei/php-kafka/pulls)MITPHPPHP ^7.4

Since Jun 29Pushed 4y ago19 watchersCompare

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

READMEChangelog (1)Dependencies (6)Versions (4)Used By (0)

PHP Kafka
=========

[](#php-kafka)

[![Build Status](https://github.com/arquivei/php-kafka/workflows/Build/badge.svg)](https://github.com/arquivei/php-kafka/actions)

A PHP client for Apache Kafka

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

[](#requirements)

- PHP 7.4
- librdkafka 1.1.0
- rdkafka 3.x

Install
-------

[](#install)

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

    ```
    $ cd /tmp
    $ mkdir librdkafka
    $ cd librdkafka
    $ curl -L https://github.com/edenhill/librdkafka/archive/v1.0.0.tar.gz | tar xz
    $ cd librdkafka-1.0.0
    $ ./configure
    $ make
    $ make install
    ```
2. Install the [php-rdkafka](https://github.com/arnaud-lb/php-rdkafka) PECL extension

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

    `extension=rdkafka.so`
4. Install this package via composer using:

    `composer require arquivei/php-kafka-consumer`

Usage
-----

[](#usage)

```
