Download the PHP package iamfarhad/laravel-rabbitmq without Composer
On this page you can find all versions of the php package iamfarhad/laravel-rabbitmq. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-rabbitmq
Laravel RabbitMQ Queue Driver
A robust RabbitMQ queue driver implementation for Laravel, providing advanced message queuing capabilities with high performance and reliability.
Features
- Native Laravel Queue API integration
- Support for delayed/scheduled jobs
- Priority queues
- Error handling and automatic retries
- SSL/TLS secure connections
- Parallel processing with multiple consumers
- Automatic queue creation and binding
- Comprehensive queue configuration options
- RabbitMQ message attributes support
- Dead letter exchanges
- Quality of Service (QoS) settings
- Quorum queue support
Support Policy
Only the latest version will get new features. Bug fixes will be provided using the following scheme:
Package Version | Laravel Version | PHP Version | Bug Fixes Until | |
---|---|---|---|---|
0.1 | 10, 11, 12 | ^8.2 | August 26th, 2025 | Documentation |
Requirements
- PHP 8.2+
- Laravel 10.x, 11.x, or 12.x
- RabbitMQ Server 3.8+
- ext-pcntl (for parallel processing)
Installation
Install the package via Composer:
The package will automatically register itself through Laravel's package discovery.
For Lumen, manually register the service provider in bootstrap/app.php
:
Configuration
Add the RabbitMQ connection to your config/queue.php
file:
Add these environment variables to your .env
file:
Basic Usage
Once configured, you can use Laravel's Queue API as normal. If you're already familiar with Laravel queues, you don't need to change anything in your code.
Dispatching Jobs
Creating Jobs
Consuming Messages
There are two ways to consume messages from RabbitMQ:
1. Standard Laravel Queue Worker
Laravel's built-in queue worker which uses basic_get
:
2. Dedicated RabbitMQ Consumer
This package provides a specialized RabbitMQ consumer which uses basic_consume
and offers better performance:
Consumer Options
Options:
--connection=
: The connection name (defaults to default connection)--queue=
: The queue name to consume from--name=default
: The consumer name--once
: Process only one job and exit--stop-when-empty
: Stop when the queue is empty--delay=0
: The delay for failed jobs (seconds)--max-jobs=0
: Maximum number of jobs to process before stopping--max-time=0
: Maximum time in seconds the worker should run--memory=128
: Memory limit in megabytes--timeout=60
: Seconds a job can run before timing out--tries=1
: Number of attempts before job is considered failed--max-priority=null
: Maximum priority level to consume--num-processes=2
: Number of parallel processes to run
Advanced Features
Priority Queues
To use priority queues:
- Set the maximum priority in your queue configuration (1-255, where higher means higher priority)
- Dispatch jobs with priority:
Parallel Processing
Run multiple consumer processes in parallel:
Quality of Service (QoS)
Configure prefetch settings in your queue configuration:
SSL/TLS Connections
To enable secure connections:
- Set
secure
totrue
in your configuration - Configure SSL options with appropriate certificates and settings
Error Handling and Retries
Failed jobs are automatically retried based on the --tries
option. Jobs that exceed the maximum retries are moved to the failed jobs table.
You can customize retry behavior:
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'Add some amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
License
This package is open-sourced software licensed under the MIT license.
All versions of laravel-rabbitmq with dependencies
illuminate/queue Version ^11.0|^12.0
php-amqplib/php-amqplib Version ^v3.7.3
illuminate/support Version ^11.0|^12.0
ext-pcntl Version *