Download the PHP package denismitr/lara-rabbit without Composer
On this page you can find all versions of the php package denismitr/lara-rabbit. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download denismitr/lara-rabbit
More information about denismitr/lara-rabbit
Files in denismitr/lara-rabbit
Package lara-rabbit
Short Description Laravel RabbitMQ driver for queues
License MIT
Informations about the package lara-rabbit
Laravel RabbitMQ driver for queues
Forked from https://github.com/vyuldashev/laravel-queue-rabbitmq
Installation
You can install this package via composer using this command:
The package will automatically register itself.
Add connection to config/queue.php
:
Laravel 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
Laravel Horizon Usage
Starting with 8.0, this package supports Laravel Horizon out of the box. Firstly, install Horizon and then set RABBITMQ_WORKER
to horizon
.
Lumen Usage
For Lumen usage the service provider should be registered manually as follow in bootstrap/app.php
:
Consuming Messages
There are two ways of consuming messages.
-
queue:work
command which is Laravel's built-in command. This command utilizesbasic_get
. rabbitmq:consume
command which is provided by this package. This command utilizesbasic_consume
and is more performant thanbasic_get
by ~2x.
Testing
Setup RabbitMQ using docker-compose
:
To run the test suite you can use the following commands:
If you receive any errors from the style tests, you can automatically fix most, if not all of the issues with the following command:
All versions of lara-rabbit with dependencies
ext-json Version *
illuminate/queue Version ^6.0
illuminate/support Version ^6.0
php-amqplib/php-amqplib Version ^2.11