Skip to content

Latest commit

 

History

History
36 lines (28 loc) · 725 Bytes

README.md

File metadata and controls

36 lines (28 loc) · 725 Bytes

中文 | English

NextCoreX

基于 hyperf 实现的基础 channel 包、提供最基本的 pull push subscribe publish 功能 内置实现了 orm redi rabbitmq 驱动

安装

composer require mine/next-core-x

使用

通过定时器进行 pull push 处理

// app/Process/ImProcess.php
use Mine\NextCoreX\Queue;
use Hyperf\WebSocketServer\Sender;
class ImProcess extends AbstractProcess
{
    public function __construct(
      private readonly Queue $queue,
      private readonly Sender $sender
    ) {}
    public function handle()
    {
        $data = Queue::pull('user_messages');
        foreach ($data as $item) {
            
        }
    }
}