idealo / php-rdkafka-ffi
PHP Kafka client - binding librdkafka via FFI
Installs: 36 502
Dependents: 1
Suggesters: 0
Security: 0
Stars: 77
Watchers: 7
Forks: 4
Open Issues: 1
Requires
- php: ^7.4 || ^8.0
- ext-ffi: *
Requires (Dev)
- composer/semver: ^3.2
- ircmaxell/php-c-parser: dev-master#fd8f5efefd0fcc6c5119d945694acaa3a6790ada
- klitsche/dog: ^0.4
- klitsche/ffigen: 0.8.1
- phpbench/phpbench: ^1.1
- phpunit/phpunit: ^9.4
- symfony/css-selector: ^5.1
- symfony/dom-crawler: ^5.1
- symplify/easy-coding-standard: ^10.0
Suggests
- ext-pcntl: *
- ext-zend opcache: *
Conflicts
- ext-rdkafka: *
README
This is a Kafka client library for PHP ^7.4 and ^8.0 with a slim librdkafka binding via FFI.
It supports the same interfaces as the PHP RdKafka extension ^5.0 and ^6.0.
Supported Features
- Consumer (low and high level)
- Producer (with support for transactional producing)
- Admin Client
- Mock Cluster to simplify integration tests (even with error situations)
- Support for error handling and logging via callbacks
Runtime Requirements
- PHP ^7.4 or ^8.0 with extensions FFI enabled
- librdkafka ^1.0.0 or ^2.0.0
- Conflicts: RdKafka extension
- Suggested:
- zend opcache extension for preloading
- pcntl extension for faster shutdown in request/response context
Note: Support for macOS and Windows is experimental.
Installation
composer require idealo/php-rdkafka-ffi
Note: Expect breaking changes along all 0.* pre-releases. This changes may depend on upcoming major releases of the RdKafka extension or improved interfaces for the experimental features like transactional producer, mock cluster and admin client.
Documentation
https://idealo.github.io/php-rdkafka-ffi/
Changelog
See Changelog for details.
Contributing
We welcome all kinds of contributions. See the Contribution guide for more details.
License
See License for details.