g41797 / queue-kafka
Yii Queue Adapter for Apache Kafka
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-11-10 07:44:25 UTC
README
Description
Yii3 Queue Adapter for Apache Kafka is adapter in Yii3 Queue Adapters family.
Implementation of adapter is based on synchronous mode of Swoole PHP Kafka client library.
Requirements
- PHP 8.2 or higher.
Installation
The package could be installed with composer:
composer require g41797/queue-kafka
General usage
- As part of Yii3 Queue Framework
- Stand-alone
Configuration
Default configuration:
[ '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']` ]
Limitations
Job Status
// Push a job into the queue and get a message ID. $id = $queue->push(new SomeJob()); // Get job status. $status = $queue->status($id);
is not supported.
Testing
Unit-testing is supported for local environment. Run of phpunit under GitHib action was disabled because problem of kafka configuration. Description of cumbersome configuration see Kafka Listeners - Explained
License
Yii3 Queue Adapter for Apache Kafka is free software. It is released under the terms of the BSD License.
Please see LICENSE
for more information.