Package Data | |
---|---|
Maintainer Username: | voilaf |
Maintainer Contact: | 415545367@qq.com (voilaf) |
Package Create Date: | 2020-05-27 |
Package Last Update: | 2020-05-28 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-23 03:21:43 |
Package Statistics | |
---|---|
Total Downloads: | 10 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 1 |
Total Forks: | 0 |
Total Open Issues: | 0 |
PHP message-system client for Laravel && Lumen
基于Roadrunner + Nats
PHP-Nats-Client社区版本超过2年未更新,稳定性很难得到保证
我们在Roadrunner中增加Service,使用官方Go-Nats-Client库, PHP与Roadrunner通过GRPC通信,转发实现PHP-Nats发布、订阅功能
message-system
is available to add to your project via composer. Simply add the
following to your composer.json.
{
...
"require": {
...
"voilaf/message-system": "^1.0"
}
...
}
or execute command.
composer require voilaf/message-system
1、copy config/message.php
to project/config/message.php
2、add your sub or pub subjects
3、add APP_NAME
to .env
4、register MessageSystemProvider to project
$this->app->register(\Voilaf\MessageSystem\MessageServiceProvider::class);
5、generate Subscribe class in app\Subs
by executing command
php artisan make:subscribe ExampleSubscribe
// string $subject 发布事件名
// string $data 发布信息
// string $desc 事件描述
app('message-client')->pub($subject, $data, $desc);