Download the PHP package lwz/laravel-mq without Composer

On this page you can find all versions of the php package lwz/laravel-mq. 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 laravel-mq

目前只支持rocketmq(基于阿里云的rocketmq封装

可靠投递实现原理

安装

  1. 下载组件包

  2. 发布配置文件

    mq.php: 队列配置文件

    默认的日志驱动如下,如果需要配置,在配置文件 logging.phpchannels 中对 queuelog 进行修改

  3. 创建基础表(如果表已存在,跳过

    mq_status_log:队列状态日志表

    mq_error_log:队列错误日志表

  4. 注册服务提供者 在 config/app.php 注册 ServiceProvider (Laravel 5.5 + 无需手动注册)

  5. 队列日志驱动 queuelog,如果需要自定义在 logging.php 中新增 queuelog 驱动

RocketMQ使用

目前只支持 RocketMQ

1. 配置文件设置

配置文件名:mq.php

2. 生产消息示例

2.1 发送单条

``

2.2 批量发送

3. 消费消息示例

注意:msg_tag 必须在 mq.php 配置文件中的routes指定消费类,否则消费失败

4. 消息幂等性处理

msgKey:消息唯一标识(可用于做幂等性处理)

5. 守护进程,监听失败消息重新投递

由于所有消息都记录在同一张表里,因此只需要启动一个 进程 即可,否则会产生多次投递的问题

6. 消费进程


All versions of laravel-mq with dependencies

PHP Build Version
Package Version
Requires aliyunmq/mq-http-sdk Version ^1.0
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 lwz/laravel-mq contains the following files

Loading the files please wait ....