Download the PHP package dojiland/amqp-laravel without Composer

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

About amqp-laravel

基于 php-amqplib / php-amqplib 针对 Laravel && Lumen 框架封装 Rabbitmq 的调用方法,方便业务开发.

Setup

本地先安装 composer, 执行以下命令加载库:

创建配置文件,执行生成 config/amqp.php 配置文件:

.env 添加 AMQP 配置项:

Laravel

Laravel 版本 >= 5.5, 会自动 package-discover,无需操作.

less than 5.5 add this to the providers array in config/app.php

Lumen

add this in bootstrap/app.php

Usage

PS: 目前只限制使用 Fanout Exchange, 默认配置使用消息持久化和ACK.

注册消费异常回调

在某个初始化过程中,调用如下代码,实现自己的消费失败回调逻辑, 如 app/Providers/AppServiceProviderboot 方法,增加 sentry 通知。

Publish

Subscribe

创建指定订阅者,执行命令

创建 app\MessageQueue\ExampleSubscribe.php 文件(若MessageQueue文件夹不存在会默认生成).

填写指定的 exchangequeue, 并在 callback 里添加消费逻辑.

amqp.php 添加订阅对象配置项:

执行命令 php artisan amqp, 启动消费进程.


All versions of amqp-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3
php-amqplib/php-amqplib Version ^2.12
psr/log Version ^1.1
evenement/evenement Version ^3.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 dojiland/amqp-laravel contains the following files

Loading the files please wait ....