g41797 / queue-kafka
Apache Kafka 的 Yii 队列适配器
v0.0.3
2024-07-10 06:21 UTC
Requires
- php: >=8.2
- g4197/kafka-php: >=0.0.3
- longlang/phpkafka: ^1.2
- phpseclib/bcmath_compat: ^2.0.1
- ramsey/uuid: ^4.7
- yiisoft/factory: ^1.0
- yiisoft/friendly-exception: ^1.0
- yiisoft/queue: dev-master
Requires (Dev)
- infection/codeception-adapter: >=0.4.3
- maglnet/composer-require-checker: ^4.7
- phpunit/phpunit: ^10.5
- rector/rector: ^1.0.3
- roave/infection-static-analysis-plugin: ^1.34
- spatie/phpunit-watcher: ^1.23
- vimeo/psalm: ^5.16
- yiisoft/test-support: ^3.0
This package is auto-updated.
Last update: 2024-09-10 07:19:58 UTC
README
描述
Yii3 Queue Adapter for Apache Kafka 是 Yii3 队列适配器家族 的一部分。
适配器的实现基于 Swoole PHP Kafka 客户端 库的同步模式。
要求
- PHP 8.2 或更高版本。
安装
可以通过 composer 安装此包
composer require g41797/queue-kafka
通用用法
- 作为 Yii3 队列框架 的一部分
- 独立使用
配置
默认配置
[ 'bootstrapServers' => 'localhost:9092', // Format `'127.0.0.1:9092,127.0.0.1:9093'` or `['127.0.0.1:9092','127.0.0.1:9093']` ]
限制
作业状态
// Push a job into the queue and get a message ID. $id = $queue->push(new SomeJob()); // Get job status. $status = $queue->status($id);
不支持。
测试
支持本地环境的单元测试。由于 Kafka 配置问题,GitHib 行动下的 phpunit 运行已被禁用。关于繁琐配置的描述,请参阅 Kafka Listeners - Explained
许可证
Yii3 Queue Adapter for Apache Kafka 是自由软件。它根据 BSD 许可证的条款发布。有关更多信息,请参阅 LICENSE
。