PHPackages                             monsieurbiz/amqp - 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. monsieurbiz/amqp

ActiveMagento2-module[Queues &amp; Workers](/categories/queues)

monsieurbiz/amqp
================

Use the power of RabbitMQ in your e-commerce running with Magento 2.

211PHP

Since Dec 17Pushed 8y ago2 watchersCompare

[ Source](https://github.com/monsieurbiz/monsieurbiz_amqp)[ Packagist](https://packagist.org/packages/monsieurbiz/amqp)[ RSS](/packages/monsieurbiz-amqp/feed)WikiDiscussions master Synced 2w ago

READMEChangelogDependenciesVersions (1)Used By (0)

MonsieurBiz AMQP
================

[](#monsieurbiz-amqp)

Use the power of RabbitMQ in your e-commerce running with Magento 2.

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

[](#installation)

With [composer](https://getcomposer.org/): `composer require monsieurbiz/amqp`.

If you want to use delayed messages then you'll have to install the \[Delayed Message Plugin\]\[\] on your RabbitMQ instance.

Create an exchange
------------------

[](#create-an-exchange)

```
magento monsieurbiz:amqp:exchange:create consume-me

```

With `consume-me` as exchange name.

You can also use a delayed exchange:

```
magento monsieurbiz:amqp:exchange:create --delayed consume-me

```

You can create multiple exchange at once:

```
magento monsieurbiz:amqp:exchange:create first-exchange-name second-exchange-name

```

Consume a queue
---------------

[](#consume-a-queue)

You have to create a consumer/worker.

Take a look at `Console/Command/SampleCommand.php`, it is a basic consumer.

Send a message in an exchange
-----------------------------

[](#send-a-message-in-an-exchange)

Considering that `$amqp` is an instance of `\MonsieurBiz\Amqp\Helper\Amqp`.

### Direct message

[](#direct-message)

```
$amqp->sendMessage(
    'consume-me',
    ['my message content']
);
```

### Delayed message

[](#delayed-message)

You need to install the [Delayed Message Plugin](https://github.com/rabbitmq/rabbitmq-delayed-message-exchange) on your RabbitMQ instance.

```
$amqp->sendMessage(
    'consume-me',
    ['my message content'],
    [
        'application_headers' => new AMQPTable([
            'x-delay' => 5000 // 5 seconds of delay
        ]),
    ]
);
```

RPC
---

[](#rpc)

Considering that `$rpc` is an instance of `\MonsieurBiz\Amqp\Helper\Rpc`.

### Direct request

[](#direct-request)

To send a request to the broker and get a response right away:

```
$response = $rpc->directRequest(
    'consume-me',
    ['my message content']
);

echo $response; // ["my message content"]
```

### Batch messages

[](#batch-messages)

Before sending a batch, you should be aware on how RPC works.

Don't forget to keep the correlation identifier of every request you make.

```
$c1 = $rpc->request('consume-me', ['my first message']);
$c2 = $rpc->request('consume-me', ['my second message']);

$responses = $rpc->getResponses();

var_dump($responses[$c1]); // string(20) "["my first message"]"
var_dump($responses[$c2]); // string(21) "["my second message"]"
```

More you have consumers running faster you'll get the responses.

LICENSE
-------

[](#license)

(c) Monsieur Biz

For the full copyright and license information, please view the LICENSE file that was distributed with this source code.

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/c469cf3368841a646d6e69475e8b79861ee299bbe5c2382f50459e3ab3607320?d=identicon)[jacquesbh](/maintainers/jacquesbh)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/monsieurbiz-amqp/health.svg)

```
[![Health](https://phpackages.com/badges/monsieurbiz-amqp/health.svg)](https://phpackages.com/packages/monsieurbiz-amqp)
```

###  Alternatives

[league/geotools

Geo-related tools PHP 7.3+ library

1.4k5.5M30](/packages/league-geotools)[illuminate/bus

The Illuminate Bus package.

6045.5M512](/packages/illuminate-bus)[uecode/qpush-bundle

Asynchronous processing for Symfony using Push Queues

1672.5M2](/packages/uecode-qpush-bundle)[mayconbordin/l5-stomp-queue

Stomp Queue Driver for Laravel 5

121.1k](/packages/mayconbordin-l5-stomp-queue)

PHPackages © 2026

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