承接 t4web/queue 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

t4web/queue

Composer 安装命令:

composer require t4web/queue

包简介

ZF2 Module. Message broker software implementation

README 文档

README

ZF2 Module. Message broker software implementation

Introduction

Contain parts:

  • Server - get messages from queue and run workers, monitor running workers count
  • Producer - produces messages and sends them to the queue
  • Worker - you background job
  • Storage - messages storage

Workflow

  • Client tell Producer what it want to process
  • Producer create message and put it in Storage and get Message Id. After this push Server to process message by Id
  • Server check Workers count (if too much workers are running, wait) and run Worker with Message Id.
  • Worker - get message from storage and process it.
                               Server
                    message  /        \  run worker
Client -> Producer --------->          -------------> Worker
                             \                          /
                               Storage             --->-

In the box we provide 2 Servers:

  1. Realtime server - uses ReactPHP to run a non-blocking server that accepts messages via a socket and executes them in a background process.
  2. Interval server - check storage for Messages by interval (run by cronjob)

Configuring

Just add in you config:

't4web-queue' => [

     'realtime-server' => [
         'enabled' => true,
         'hostname' => 'localhost',
         'port' => 4000,
     ],

     'queues' => [

         // Queue name
         'test-engine' => [

             // Handler class
             'handler' => EchoWorker::class,

             // count workers, optional, default 1
             'worker-count' => 1,

             // You can limit the amount of time a process takes to complete by setting a timeout (in seconds)
             // optional, default 300
             'timeout' => 300,

             // optional, default 0
             'debug-enable' => 1,
         ],
     ],
 ];

Runing

$ php public/index.php queue realtime-server

统计信息

  • 总下载量: 15
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 3
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2016-06-20

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固