This is a Kafka client library for PHP ^7.4 with a slim librdkafka binding via FFI.
It supports the same interfaces as the PHP RdKafka extension ^4.0.
- 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
- PHP ^7.4 or ^8.0 with extensions FFI and pcntl
- librdkafka ^1.0.0
- Conflicts: RdKafka extension
- Suggested: zend opcache extension for preloading
Note: Support for macOS and Windows is currently experimental.
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.
https://idealo.github.io/php-rdkafka-ffi/
We welcome all kinds of contributions. See the Contribution guide for more details.
See License for details.