承接 filkhedma/laravel-queue-rabbitmq 相关项目开发

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

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

filkhedma/laravel-queue-rabbitmq

Composer 安装命令:

composer require filkhedma/laravel-queue-rabbitmq

包简介

RabbitMQ driver for Laravel Queue

README 文档

README

Latest Stable Version Build Status Total Downloads StyleCI License

Installation

You can install this package via composer using this command:

composer require vladimir-yuldashev/laravel-queue-rabbitmq

The package will automatically register itself.

Add these properties to .env with proper values:

QUEUE_DRIVER=rabbitmq
RABBITMQ_QUEUE=queue_name

RABBITMQ_DSN=amqp: # same as amqp://guest:guest@127.0.0.1:5672/%2F
# or 
RABBITMQ_HOST=127.0.0.1
RABBITMQ_PORT=5672
RABBITMQ_VHOST=/
RABBITMQ_LOGIN=guest
RABBITMQ_PASSWORD=guest
RABBITMQ_QUEUE=queue_name

Optionally, if you want to to use an SSL connection, add these properties to the .env with proper values:

RABBITMQ_SSL=true
RABBITMQ_SSL_CAFILE=/path_to_your_ca_file
RABBITMQ_SSL_LOCALCERT=
RABBITMQ_SSL_PASSPHRASE=
RABBITMQ_SSL_KEY=

Using an SSL connection will also require to configure your RabbitMQ to enable SSL. More details can be founds here: https://www.rabbitmq.com/ssl.html

Usage

Once you completed the configuration you can use Laravel Queue API. If you used other queue drivers you do not need to change anything else. If you do not know how to use Queue API, please refer to the official Laravel documentation: http://laravel.com/docs/queues

Using other AMQP transports

The package uses enqueue/amqp-lib transport which is based on php-amqplib. There is possibility to use any amqp interop compatible transport, for example enqueue/amqp-ext or enqueue/amqp-bunny. Here's an example on how one can change the transport to enqueue/amqp-bunny.

First, install desired transport package:

composer require enqueue/amqp-bunny:^0.8

Change the factory class in config/queue.php:

...
    'connections' => [
        'rabbitmq' => [
            'driver' => 'rabbitmq',
            'factory_class' => Enqueue\AmqpBunny\AmqpConnectionFactory::class,
        ],
    ],

Testing

You can run the tests with:

vendor/bin/phpunit

Contribution

You can contribute to this package by discovering bugs and opening issues. Please, add to which version of package you create pull request or issue. (e.g. [5.2] Fatal error on delayed job)

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 458
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-08-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固