PHPackages                             vladmeh/rabbitmq-client - 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. vladmeh/rabbitmq-client

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

vladmeh/rabbitmq-client
=======================

Laravel RabbitMQ Client

2.0.3(5y ago)0341MITPHPPHP ^7.2.5

Since Sep 21Pushed 5y ago1 watchersCompare

[ Source](https://github.com/vladmeh/rabbitmq-client)[ Packagist](https://packagist.org/packages/vladmeh/rabbitmq-client)[ Docs](https://github.com/vladmeh/rabbitmq-client)[ RSS](/packages/vladmeh-rabbitmq-client/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (3)Versions (15)Used By (1)

[![Build Status](https://camo.githubusercontent.com/1100b0219c25fd168ec6642d5ce43d6b8a737be9b02ce0b5f612103526e56fbb/68747470733a2f2f7472617669732d63692e6f72672f766c61646d65682f7261626269746d712d636c69656e742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/vladmeh/rabbitmq-client)[![Codacy Badge](https://camo.githubusercontent.com/a855632d4fae68aad8eb302135f978542b84d6141e15b8b9eb90ff67e85ad89a/68747470733a2f2f6170702e636f646163792e636f6d2f70726f6a6563742f62616467652f47726164652f6362323130376236616233623432376362303433613233393236653762346361)](https://www.codacy.com/gh/vladmeh/rabbitmq-client/dashboard?utm_source=github.com&utm_medium=referral&utm_content=vladmeh/rabbitmq-client&utm_campaign=Badge_Grade)[![StyleCI](https://camo.githubusercontent.com/78b38a3300f6b3315f5bc844aadfedf346dc5371d3ca0754716f6bf7c14e4249/68747470733a2f2f6769746875622e7374796c6563692e696f2f7265706f732f3239373330343831342f736869656c643f6272616e63683d6d6173746572)](https://github.styleci.io/repos/297304814?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/33a1cb6fe924dfa4a7d01d494950c2a8cc3c78e14a2b74e47df4c260f5b15b62/68747470733a2f2f706f7365722e707567782e6f72672f766c61646d65682f7261626269746d712d636c69656e742f76)](//packagist.org/packages/vladmeh/rabbitmq-client)[![Total Downloads](https://camo.githubusercontent.com/07d789f233a708fdc8c60a03b03f20fb4f4389c07fd834d16d012da6e2ffbfe3/68747470733a2f2f706f7365722e707567782e6f72672f766c61646d65682f7261626269746d712d636c69656e742f646f776e6c6f616473)](//packagist.org/packages/vladmeh/rabbitmq-client)[![License](https://camo.githubusercontent.com/df505739c50969b6282a72d889bac6b634db2c578bd51ff2f43c7a6a7569ac9d/68747470733a2f2f706f7365722e707567782e6f72672f766c61646d65682f7261626269746d712d636c69656e742f6c6963656e7365)](//packagist.org/packages/vladmeh/rabbitmq-client)

vladmeh/rabbitmq-client
=======================

[](#vladmehrabbitmq-client)

Wrapper to [php-amqplib](https://github.com/php-amqplib/php-amqplib) library for publishing and consuming [RabbitMQ](https://www.rabbitmq.com/tutorials/tutorial-six-php.html) messages using [Laravel framework](https://laravel.com/docs/master)

Features
--------

[](#features)

- php v7.\*
- [php-amqplib v2.12](https://github.com/php-amqplib/php-amqplib)
- [Laravel from v6.\* and above](https://laravel.com/docs/master)

> **PHP8.0 support** will be available after php-amqplib is updated to the next major version 3.0. ([php-amqplib/php-amqplib#858](https://github.com/php-amqplib/php-amqplib/pull/858))

### Version Compatibility

[](#version-compatibility)

LaravelRabbit Client6.x1.x7.x2.x8.x--Installation
------------

[](#installation)

### Composer

[](#composer)

```
$ composer require vladmeh/rabbit-client
```

or add the following to your requirement part within the composer.json:

```
{
    "require": {
        "vladmeh/rabbitmq-client": "^2.*"
    }
}
```

> Laravel will automatically register service provider (Vladmeh\\RabbitMQ\\RabbitMQClientProvider) and facade when is installed

### Configure

[](#configure)

Add these properties to .env with proper values:

```
RABBITMQ_HOST=localhost
RABBITMQ_PORT=5672
RABBITMQ_USER=guest
RABBITMQ_PASSWORD=guest
```

If you need advanced configuration properties run:

```
$ php artisan vendor:publish --tag=rabbit
```

This command will create a config file `\config\rabbit.php`

Integration
-----------

[](#integration)

### Producer

[](#producer)

#### Publish a message in the existing queue

[](#publish-a-message-in-the-existing-queue)

```
Rabbit::publish('message', '', 'queue-name');
```

#### Publish a message in the existing exchange

[](#publish-a-message-in-the-existing-exchange)

```
Rabbit::publish('message', 'exchange-name', 'routing-key');
```

### Publish a message, with custom settings

[](#publish-a-message-with-custom-settings)

```
Rabbit::publish('message', 'amq.fanout', '', [
    'hosts' => [
        'vhosts' => 'vhost3'
    ],
    'message' => [
        'content_type' => 'application/json',
    ],
    'exchange_declare' => [
        'type' => 'fanout',
        'auto_delete' => true,
    ]
]);
```

> All default settings are defined in `\config\rabbit.php`.

### Consumer

[](#consumer)

#### Consume messages to an existing queue

[](#consume-messages-to-an-existing-queue)

```
Rabbit::consume('queue-name', function (AMQPMessage $msg) {
    $msg->ack();
    var_dump($msg->body);
    if ($msg->getMessageCount() === null) {
        $msg->getChannel()->basic_cancel($msg->getConsumerTag());
    }
});
```

### RPC client

[](#rpc-client)

```
$response = Rabbit::rpc('message', 'queue-name', ['connection' => [
    'read_write_timeout' => 10.0,
    'channel_rpc_timeout' => 10.0
]]);

var_dump($response);
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity57

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

Every ~11 days

Recently: every ~0 days

Total

14

Last Release

1916d ago

Major Versions

1.2.2 → 2.0.12021-02-10

1.2.4 → 2.0.32021-02-11

1.x-dev → 2.x-dev2021-02-11

PHP version history (3 changes)1.0.1PHP ^7.2

2.0.1PHP ^7.2.5|^8.0

2.0.3PHP ^7.2.5

### Community

Maintainers

![](https://www.gravatar.com/avatar/4409980da032274af0b50937a69d5be82e4e5336ed8b68c194692ec3c90c0b84?d=identicon)[Vladmeh](/maintainers/Vladmeh)

---

Top Contributors

[![vladmeh](https://avatars.githubusercontent.com/u/402267?v=4)](https://github.com/vladmeh "vladmeh (2 commits)")

---

Tags

laravelrabbitmq

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/vladmeh-rabbitmq-client/health.svg)

```
[![Health](https://phpackages.com/badges/vladmeh-rabbitmq-client/health.svg)](https://phpackages.com/packages/vladmeh-rabbitmq-client)
```

###  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)[kunalvarma05/laravel-rabbitmq

Work with RabbitMQ in Laravel.

1853.7k](/packages/kunalvarma05-laravel-rabbitmq)[kontoulis/rabbitmq-laravel

RabbitMQ Broker for Laravel

151.2k](/packages/kontoulis-rabbitmq-laravel)

PHPackages © 2026

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