Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/swoole/phpkafka
PHP Kafka client is used in PHP-FPM and Swoole. PHP Kafka client supports 50 APIs, which might be one that supports the most message types ever.
https://github.com/swoole/phpkafka
kafka php swoole
Last synced: about 1 month ago
JSON representation
PHP Kafka client is used in PHP-FPM and Swoole. PHP Kafka client supports 50 APIs, which might be one that supports the most message types ever.
- Host: GitHub
- URL: https://github.com/swoole/phpkafka
- Owner: swoole
- License: apache-2.0
- Created: 2020-08-24T03:23:47.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2024-02-21T11:43:29.000Z (10 months ago)
- Last Synced: 2024-05-23T02:21:02.935Z (7 months ago)
- Topics: kafka, php, swoole
- Language: PHP
- Homepage: https://longlang.org/
- Size: 485 KB
- Stars: 257
- Watchers: 10
- Forks: 45
- Open Issues: 23
-
Metadata Files:
- Readme: README.cn.md
- License: LICENSE
Awesome Lists containing this project
- awesome-swoole - longlang/phpkafka - A coroutine-based [Kafka](https://kafka.apache.org) client. (Tasks and Queues)
README
# longlang/phpkafka
[![Latest Version](https://poser.pugx.org/longlang/phpkafka/v/stable)](https://packagist.org/packages/longlang/phpkafka)
[![Php Version](https://img.shields.io/badge/php-%3E=7.1-brightgreen.svg)](https://secure.php.net/)
[![License](https://img.shields.io/github/license/longyan/phpkafka.svg)](https://github.com/longyan/phpkafka/blob/master/LICENSE)## 简介
[English](README.md) | 简体中文
PHP Kafka 客户端,支持 PHP-FPM、Swoole 环境使用。
通讯协议的结构基于 Java 版本中的 JSON 文件生成,这可能是有史以来支持消息类型最多的 PHP Kafka 客户端,支持全部 50 个 API。
> 目前已实现消息的生成及消费,本组件仍处于开发及测试阶段。
## 功能特性
- [x] 支持全部 50 个 API
- [x] 消息压缩支持 (gzip、snappy、lz4、zstd)
- [x] PHP-FPM、Swoole 智能环境识别兼容
- [x] 生产者类
- [x] 消费者类
- [x] SASL 鉴权
- [x] SSL 加密通信
- [ ] 更多功能的封装及测试用例编写## 环境要求
- PHP >= 7.1
- Kafka >= 1.0.0
- Swoole >= 4.5 (可选)## 安装
`composer require longlang/phpkafka`
## 文档及示例
- [生产者](doc/producer.md)
- [消费者](doc/consumer.md)
示例代码请参考 `examples` 目录