webit/message-bus
Composer 安装命令:
composer require webit/message-bus
包简介
README 文档
README
The library provides an abstraction to publish / consume messages to / from message bus.
Installation
composer require webit/message-bus ^1.0.0
Concepts introduction
Message
Message is just simple container to be published by Publisher and consumed by Consumer.
$message = new Message('message-type', json_encode(['some' => 'data to be sent']));
Message type is required to recognise what sort of message is sent and helps to understand how it should be handled. Message content is a message itself. It can be any string (not necessarily json).
Publisher and Consumer
Publisher publishes a message (using underlying infrastructure) but Consumer awaiting the Message to process it.
Infrastructure is to be provided by a separate package. It should provide "webit/message-bus-infrastructure:^1.0.0" Composer Virtual Package.
Tests
./vendor/bin/phpunit
统计信息
- 总下载量: 81
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 4
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-12-04