A kafka client. Support php-fpm and Swoole.

dev-master 2023-10-03 14:40 UTC

This package is auto-updated.

Last update: 2024-06-03 16:13:49 UTC


Latest Version Php Version License


English | 简体中文

PHP Kafka client is used in PHP-FPM and Swoole.

The communication protocol is based on the JSON file in Java. PHP Kafka client supports 50 APIs, which might be one that supports the most message types ever.

The produce and the consume of messages are implemented. The component is in developing and testing.


  • Support all 50 APIs
  • Message compression
  • PHP-FPM and Swoole compatible
  • Producer
  • Consumer
  • SASL
  • SSL
  • More features and test cases


  • PHP >= 7.1
  • Kafka >= 1.0.0
  • Swoole >= 4.5 (optional)


composer require longlang/phpkafka

Documentation and Examples

Refer to examples for code examples.