2017 © Pedro Peláez
 

library laravel-amqp

AMQP library driver for Laravel Queue

image

fhteam/laravel-amqp

AMQP library driver for Laravel Queue

  • Thursday, April 5, 2018
  • by FractalizeR
  • Repository
  • 9 Watchers
  • 20 Stars
  • 6,493 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 11 Forks
  • 2 Open issues
  • 14 Versions
  • 1 % Grown

The README.md

laravel-amqp PHP version Code Climate Laravel compatibility

AMQP driver for Laravel queue. This driver uses popular AMQPLib for PHP: https://github.com/videlalvaro/php-amqplib (This library is a pure PHP implementation of the AMQP protocol so it may be used to connect to a number of queue managers around), (*1)

Installation

Please do note, that package name has changed to fhteam/laravel-amqp. Old name should still work, though it will not be maintained., (*2)

  • Simple composer installation is ok: composer require fhteam/laravel-amqp:~1.0 (set version requirement to your favourite)
  • Note, that mbstring and bcmath extensions are required for php-amqplib to work properly. The first is not yet listed in library's composer.json (https://github.com/videlalvaro/php-amqplib/issues/229)

Configuration

In your config/queue.php file you have to provide the following:, (*3)


'default' => 'amqp', 'connections' => array( 'amqp' => array( 'driver' => 'amqp', 'host' => 'localhost', 'port' => '5672', 'user' => 'guest', 'password' => 'guest', 'vhost' => '/', 'queue' => null, 'queue_flags' => ['durable' => true, 'routing_key' => null], //Durable queue (survives server crash) 'declare_queues' => true, //If we need to declare queues each time before sending a message. If not, you will have to declare them manually elsewhere 'message_properties' => ['delivery_mode' => 2], //Persistent messages (survives server crash) 'channel_id' => null, 'exchange_name' => null, 'exchange_type' => null, 'exchange_flags' => null, 'keepalive' > false, 'heartbeat' => 0, 'retry_after' => 0, ), ),

In your config/app.php add 'Forumhouse\LaravelAmqp\ServiceProvider\LaravelAmqpServiceProvider' to the list of service providers registered., (*4)

Improved worker stability (PHP 7.1+ is required)

For better stability please add following code in app/Exceptions/Handler.php:, (*5)

class Handler extends ExceptionHandler
{

to, (*6)

class Handler extends ExceptionHandler
{
    use AMQPFailureDetector;

And, (*7)

public function report(Exception $exception)
{
    parent::report($exception);
}

to, (*8)

public function report(Exception $exception)
{
    $this->catchAMQPConnectionFailure($exception);
    parent::report($exception);
}

Usage

To find out how to use Laravel Queues, please refer to the following official documentation: http://laravel.com/docs/queues, (*9)

The Versions

05/04 2018

dev-master

9999999-dev

AMQP library driver for Laravel Queue

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

05/04 2018

dev-foenixteam-master

dev-foenixteam-master

AMQP library driver for Laravel Queue

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

01/06 2017

v3.0.0

3.0.0.0

AMQP library driver for Laravel Queue

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

13/08 2015

v2.0.1

2.0.1.0

AMQP library driver for Laravel Queue

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

01/04 2015

v2.0.0

2.0.0.0

AMQP library driver for Laravel Queue

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

08/03 2015

v1.2.1

1.2.1.0

AMQP library driver for Laravel Queue

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

05/03 2015

v1.2.0

1.2.0.0

AMQP library driver for Laravel Queue

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

02/03 2015

v1.1.0

1.1.0.0

AMQP library driver for Laravel Queue

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

06/11 2014

v1.0.5

1.0.5.0

AMQP library driver for Laravel Queue

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

06/11 2014

v1.0.4

1.0.4.0

AMQP library driver for Laravel Queue

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

06/11 2014

v1.0.3

1.0.3.0

AMQP library driver for Laravel Queue

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

05/11 2014

v1.0.2

1.0.2.0

AMQP library driver for Laravel Queue

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

05/11 2014

v1.0.1

1.0.1.0

AMQP library driver for Laravel Queue

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires

05/11 2014

v1.0.0

1.0.0.0

AMQP library driver for Laravel Queue

  Sources   Download

GPL-2.0

The Requires

 

The Development Requires