phpgears/cqrs-async-queue-interop
Composer 安装命令:
composer require phpgears/cqrs-async-queue-interop
包简介
Queue-interop async decorator for CQRS command bus
README 文档
README
Queue-interop async CQRS
Queue-interop async decorator for CQRS command bus
Installation
Composer
composer require phpgears/cqrs-async-queue-interop
Usage
Require composer autoload file
require './vendor/autoload.php';
Asynchronous Commands Bus
Please review phpgears/cqrs-async for more information on async command bus
use Gears\CQRS\Async\AsyncCommandBus; use Gears\CQRS\Async\QueueInterop\QueueInteropCommandQueue; use Gears\CQRS\Async\Serializer\JsonCommandSerializer; use Gears\CQRS\Async\Discriminator\ParameterCommandDiscriminator; /* @var \Gears\CQRS\CommandBus $commandBus */ /* @var \Interop\Queue\PsrContext $context */ /* @var \Interop\Queue\PsrDestination $destination */ $commandQueue = new QueueInteropCommandQueue(new JsonCommandSerializer(), $context, $destination); $asyncCommandBus new AsyncCommandBus( $commandBus, $commandQueue, new ParameterCommandDiscriminator('async') ); $asyncCommand = new CustomCommand(['async' => true]); $asyncCommandBus->handle($asyncCommand);
There are some queue-interop implementations available such as Enqueue which supports an incredible number of message queues
Contributing
Found a bug or have a feature request? Please open a new issue. Have a look at existing issues before.
See file CONTRIBUTING.md
License
See file LICENSE included with the source code for a copy of the license terms.
统计信息
- 总下载量: 15
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 12
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-09-29