Download the PHP package playcat/queue-tpswoole without Composer

On this page you can find all versions of the php package playcat/queue-tpswoole. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package queue-tpswoole

Playcat\Queue\Tpswoole

基于Thinkphp6+和Swoole4+协程的消息队列服务 支持 Redis、Kafka 和 RabbitMQ等多种驱动,自带延迟消息和异常重试,开发简单

特性

模块与版本

安装

在Thinkphp项目下执行

使用方法

1.配置

1.1

编辑TP目录下的config\playcatqueue.php文件,编辑相应内容为自己环境使用的配置。 如果你使用过1.4之前的版本需要手动对比下配置文件或使用新格式的重新配置一次。

1.2 初始化数据库(只需一次)

2.创建消费任务

新建一个php的文件并且添加以下内容:

ConsumerData方法

将上面编写好的任务文件保存TP项目中'app/queue/playcat/'下(如果目录不存在则自己手动创建)

启动服务:

队列服务分为2个主服务。一个为即时消费服务,另一个为定时消费服务。可以在一台机器上同时启用消费和计时服务,也可以只启用消费服务端而和其它机器使用共同的定时消费服务端。

消费者服务

启动: php think playcatqueue:consumerservice start

重载:可在不重启服务的情况下更新业务 php think playcatqueue:consumerservice reload

停止: php think playcatqueue:consumerservice stop

延迟任务服务

启动: php think playcatqueue:timerserver start

停止: php think playcatqueue:timerserver stop

如果没有错误出现则表示启动完成

添加任务并且提交到队列中

ProducerData方法

异常与重试机制

任务在执行过程中未抛出异常则默认执行成功,否则则进入重试阶段. 重试次数和时间由配置控制,重试间隔时间为当前重试次数的幂函数。 Playcat\Queue\Exceptions\DontRetry异常会忽略掉重试

其它

注意:所有执行的消费任务默认是开启协程并且不可关闭的。由于与常规模式执行有点区别,所以可能出现一些不是预期的情况(例如mysql和redis在协程下的复用问题)。如果没有接触过协程或开发过程中发现问题建议先看下swoole的相关文档。

基于webman的playcat queue playcat-queue

QQ:318274085

License

MIT


All versions of queue-tpswoole with dependencies

PHP Build Version
Package Version
Requires php Version >7.2
topthink/framework Version ^6.0
playcat/queue-base Version ^1.4
ext-swoole Version >=4.8
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package playcat/queue-tpswoole contains the following files

Loading the files please wait ....