Skip to content

ldebrouwer/laravel-amqp

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

laravel-amqp PHP version Code Climate Laravel compatibility 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)

Installation

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

  • 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 (php-amqplib/php-amqplib#229)

Configuration

In your config/queue.php file you have to provide the following:

'default' => 'amqp',

'connections' => array(
    'amqp' => array(
        'driver' => 'amqp',
        'host' => 'localhost',
        'port' => '5672',
        'user' => 'guest',
        'password' => 'guest',
        'vhost' => '/',
        'queue' => null,
        'queue_flags' => ['durable' => true], //Durable queue (survives server crash)
        'message_properties' => ['delivery_mode' => 2], //Persistent messages (survives server crash)
        'channel_id' => null,
        'exchange_name' => null,
        'exchange_type' => null,
        'exchange_flags' => null,
        ),
),

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

Usage

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

About

AMQP driver for Laravel queue

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 100.0%