PHPackages                             0mithun/laravel-rabbitmq - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Queues &amp; Workers](/categories/queues)
4. /
5. 0mithun/laravel-rabbitmq

ActiveLibrary[Queues &amp; Workers](/categories/queues)

0mithun/laravel-rabbitmq
========================

the best laravel rabbitmq package

1.0(10mo ago)04MITPHPPHP ^8.2CI failing

Since Jun 18Pushed 10mo agoCompare

[ Source](https://github.com/0mithun/laravel-rabbitmq)[ Packagist](https://packagist.org/packages/0mithun/laravel-rabbitmq)[ GitHub Sponsors](https://github.com/0mithun)[ RSS](/packages/0mithun-laravel-rabbitmq/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (9)Versions (2)Used By (0)

RabbitMQ Queue driver for Laravel
=================================

[](#rabbitmq-queue-driver-for-laravel)

[![Latest Stable Version](https://camo.githubusercontent.com/ac4544e54a2bdaee0be3d8d6a452f34561c77cb64257e47561b0e6f424686400/68747470733a2f2f706f7365722e707567782e6f72672f306d697468756e2f6c61726176656c2d7261626269746d712f762f737461626c653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/0mithun/laravel-rabbitmq)[![Total Downloads](https://camo.githubusercontent.com/bcb915101bce8bd5528d08fd29b3ffb6e8cf989488f7371f920b087d6b87e576/68747470733a2f2f706f7365722e707567782e6f72672f306d697468756e2f6c61726176656c2d7261626269746d712f646f776e6c6f6164733f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/0mithun/laravel-rabbitmq)[![License](https://camo.githubusercontent.com/5d5fd5b6ae3ea751391bfefbbb234e670205414b1ec2a8e06f789a9ee277ea6b/68747470733a2f2f706f7365722e707567782e6f72672f766c6164696d69722d79756c6461736865762f6c61726176656c2d71756575652d7261626269746d712f6c6963656e73653f666f726d61743d666c61742d737175617265)](https://packagist.org/packages/0mithun/laravel-rabbitmq)[![Tests](https://github.com/0mithun/LaravelRabbitMQ/actions/workflows/tests.yml/badge.svg)](https://github.com/0mithun/LaravelRabbitMQ/actions/workflows/tests.yml)[![Code style](https://github.com/0mithun/LaravelRabbitMQ/actions/workflows/code-style.yml/badge.svg)](https://github.com/0mithun/LaravelRabbitMQ/actions/workflows/code-style.yml)

The connection abstracts the socket connection, and takes care of protocol version negotiation and authentication and so on for us. Here we connect to a RabbitMQ node on the local machine - hence the localhost. If we wanted to connect to a node on a different machine or to a host hosting a [proxy recommended for PHP clients](https://github.com/cloudamqp/amqproxy), we'd simply specify its hostname or IP address here.

Support Policy
--------------

[](#support-policy)

Only the latest version will get new features. Bug fixes will be provided using the following scheme:

Package VersionLaravel VersionPHP VersionBug Fixes Until0.110, 11^8.2August 26th, 2025[Documentation](https://github.com/0mithun/LaravelRabbitMQ/blob/master/README.md)this is experimental version of the package

Installation
------------

[](#installation)

You can install this package via composer using this command:

```
composer require 0mithun/laravel-rabbitmq

```

The package will automatically register itself.

Add connection to config/queue.php:

```
    'connections' => [
        // .....
        'rabbitmq' => [
            'driver' => 'rabbitmq',
            'queue'  => env('RABBITMQ_QUEUE', 'default'),

            'hosts' => [
                'host'      => env('RABBITMQ_HOST', '127.0.0.1'),
                'port'      => env('RABBITMQ_PORT', 5672),
                'user'      => env('RABBITMQ_USER', 'guest'),
                'password'  => env('RABBITMQ_PASSWORD', 'guest'),
                'vhost'     => env('RABBITMQ_VHOST', '/'),
                'lazy'      => env('RABBITMQ_LAZY_CONNECTION', true),
                'keepalive' => env('RABBITMQ_KEEPALIVE_CONNECTION', false),
                'heartbeat' => env('RABBITMQ_HEARTBEAT_CONNECTION', 0),
                'secure'    => env('RABBITMQ_SECURE', false),
            ],

            'options' => [
                'ssl_options' => [
                    'cafile'      => env('RABBITMQ_SSL_CAFILE', null),
                    'local_cert'  => env('RABBITMQ_SSL_LOCALCERT', null),
                    'local_key'   => env('RABBITMQ_SSL_LOCALKEY', null),
                    'verify_peer' => env('RABBITMQ_SSL_VERIFY_PEER', true),
                    'passphrase'  => env('RABBITMQ_SSL_PASSPHRASE', null),
                ],
                'queue'       => [
                    'job' => \Mithun\LaravelRabbitMQ\Jobs\RabbitMQJob::class,
                    'qos' => [
                        'prefetch_size' => 0,
                        'prefetch_count' => 10,
                        'global' => false
                    ]
                ],
            ],
        ]
    ]
```

Laravel Usage
-------------

[](#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:

Lumen Usage
-----------

[](#lumen-usage)

For Lumen usage the service provider should be registered manually as follows in `bootstrap/app.php`:

```
$app->register(Mithun\LaravelRabbitMQ\LaravelRabbitQueueServiceProvider::class);
```

Consuming Messages
------------------

[](#consuming-messages)

There are two ways of consuming messages.

1. `queue:work` command which is Laravel's built-in command. This command utilizes `basic_get`.
2. `rabbitmq:consume` command which is provided by this package. This command utilizes `basic_consume` and is more performant than `basic_get` by ~3x.

```
  php artisan rabbitmq:consume --queue=customQueue
```

You can create jobs with custom queue same as below

```
class TestJob implements ShouldQueue
{
    use Dispatchable;
    use InteractsWithQueue;
    use Queueable;
    use SerializesModels;

    public function __construct()
    {
        $this->onQueue('customQueue');
    }

    public function handle()
    {
        return true;
    }
}
```

Queues and Exchanges will be created automatically

laravel-rabbitmq
================

[](#laravel-rabbitmq)

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance53

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

328d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6bfce2a59798d05a2b0a880149eaddb78c0b5944c8f6fa80de021dcf11a20014?d=identicon)[0mithun](/maintainers/0mithun)

---

Top Contributors

[![0mithun](https://avatars.githubusercontent.com/u/43243086?v=4)](https://github.com/0mithun "0mithun (8 commits)")

---

Tags

messagelaravelqueuejobrabbitmq

###  Code Quality

TestsPHPUnit

Static AnalysisRector

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/0mithun-laravel-rabbitmq/health.svg)

```
[![Health](https://phpackages.com/badges/0mithun-laravel-rabbitmq/health.svg)](https://phpackages.com/packages/0mithun-laravel-rabbitmq)
```

###  Alternatives

[bschmitt/laravel-amqp

AMQP wrapper for Laravel and Lumen to publish and consume messages

2752.3M7](/packages/bschmitt-laravel-amqp)[convenia/pigeon

3233.0k](/packages/convenia-pigeon)[mookofe/tail

RabbitMQ and PHP client for Laravel and Lumen that allows you to add and listen queues messages just simple

5552.5k](/packages/mookofe-tail)[maqe/laravel-sqs-fifo

Laravel package that enables support for SQS FIFO Queue

15137.2k](/packages/maqe-laravel-sqs-fifo)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
