PHPackages                             ipedis/rabbit-client-bundle - 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. ipedis/rabbit-client-bundle

ActiveLibrary

ipedis/rabbit-client-bundle
===========================

Symfony bundle for rabbit client

2.1.1(3mo ago)07↑2900%PHPPHP &gt;=8.4.0CI passing

Since Jan 17Pushed 1mo agoCompare

[ Source](https://github.com/ipedis/rabbit-client-bundle)[ Packagist](https://packagist.org/packages/ipedis/rabbit-client-bundle)[ RSS](/packages/ipedis-rabbit-client-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (8)Versions (55)Used By (0)

RabbitMQ - Publispeak client symfony Bundle
-------------------------------------------

[](#rabbitmq---publispeak-client-symfony-bundle)

Installation
============

[](#installation)

Update `composer.json` and add a repository:

```
"repositories": [
    {
        "type": "vcs",
        "url": "bitbucket:ipedis/rabbit-client.git"
    },
    {
        "type": "vcs",
        "url": "bitbucket:ipedis/rabbit-client-bundle.git"
    }
]

```

Require the library:

```
"require": {
    "ipedis/rabbit-client-bundle": "^1.0.0"
}

```

---

For PHP &gt;= 8.2 and symfony &gt;= 7.4

```
"require": {
    "ipedis/rabbit-client-bundle": "2.0.7"
}

```

---

For PHP &gt;= 8.4 and symfony &gt;= 8

```
"require": {
    "ipedis/rabbit-client-bundle": "^2.1.1"
}

```

---

Configuration
=============

[](#configuration)

on `config/packages` folder, create yaml configuration like following:

```
ipedis_rabbit:
  protocol_version: "v1"
  service_name: "admin"

  connection:
    host: "localhost"
    port: 5672
    user: "guest"
    password: "guest"

  order:
    exchange: "publispeak_orders"
    type: "topic"

  event:
    exchange: "publispeak_events"
    type: "topic"

```

*all configurations have default value so there are all optional*

---

on `config/bundles.php` add `RabbitBundle` as bellow:

```
Ipedis\Bundle\Rabbit\RabbitBundle::class => ['all' => true]

```

---

Get Started: Publish and Subscribe.
===================================

[](#get-started-publish-and-subscribe)

**Create event listener worker**

Create service like following:

```
use Closure;
use Ipedis\Bundle\Rabbit\Service\Connectable\Connectable;
use Ipedis\Bundle\Rabbit\Service\Contract\ProcessInterface;
use Ipedis\Rabbit\Event\EventListener;
use PhpAmqpLib\Message\AMQPMessage;

class Binding extends Connectable implements ProcessInterface
{
    use EventListener;

    protected function getProcessing(): Closure
    {
        return function (AMQPMessage $message) {
            $data = json_decode($message->getBody(), true);
            // [...]
        };
    }

    protected function getBindingKey(): string
    {
        return 'publication.*';
    }
}

```

---

Create service configuration as following:

```
App\Service\Binding:
    parent: Ipedis\Bundle\Rabbit\Service\Connectable\EventConnectable
    autoconfigure: false
    autowire: true
    tags:
        - { name: "ipedis_rabbit.worker", key: "binding" }

```

*on tag, `binding` key will be used to identify worker from cli*

```
php bin/console ip:worker:spawner binding

```

---

**Event Dispatcher**

require service `Ipedis\Bundle\Rabbit\Service\Dispatcher\EventDispatcher` and dispatch any event as :

```
public function index(EventDispatcher $dispatcher)
{
    $dispatcher->dispatchEvent('publication.was-exported', [
        'publication' => ['sid' => 1234]
    ]);
}

```

it will use `connection` and `event` configuration from bundle configuration.

Get Started: Mananger and Worker
================================

[](#get-started-mananger-and-worker)

Create service Manager as following:

```
use Ipedis\Bundle\Rabbit\Service\Connectable\OrderConnectable;
use Ipedis\Bundle\Rabbit\Service\Contract\ProcessInterface;
use PhpAmqpLib\Message\AMQPMessage;

class Manager extends OrderConnectable implements ProcessInterface
{
    use \Ipedis\Rabbit\Order\Manager;

    protected $taskIsFinish;

    public function execute()
    {
        $this->taskIsFinish = false;
        $this->connect();
        $anoQueue = $this->bindCallbackToAnonymousQueue([$this,"callback"]);

        $this->publishTask(Worker::getQueueName(),
            [
                "name" => "task"
            ],
            $anoQueue,
            'task'
        );

        while (!$this->taskIsFinish) {
            $this->channel->wait();
        }
    }

    /**
     * @description will be executed as soon as worker will send findback on anonymous queue.
     * @param AMQPMessage $message
     */
    public function callback(AMQPMessage $message) {
        $params = json_decode($message->getBody(),true);
        switch ($params['status']) {
            case "PROGRESS":
                $this->onProgress($message);
                break;
            case "SUCCESS":
                $this->onSuccess($message);
                break;
            case "ERROR":
                $this->onError($message);
                break;
        }

    }

    private function onProgress(AMQPMessage $message)
    {
        // [...]
    }

    private function onSuccess(AMQPMessage $message)
    {
        // [...]
        $this->taskIsFinish = true;
    }

    private function onError(AMQPMessage $message)
    {
        // [...]
        $this->taskIsFinish = true;
    }
    public function __destruct()
    {
        $this->disconnect();
    }
}

```

and config as following

```
App\Service\Manager:
    parent: Ipedis\Bundle\Rabbit\Service\Connectable\OrderConnectable
    autoconfigure: false
    autowire: true
    tags:
        - { name: "ipedis_rabbit.worker", key: "manager" }

```

Create Service Worker as following:

```
use Ipedis\Bundle\Rabbit\Service\Connectable\OrderConnectable;
use Ipedis\Bundle\Rabbit\Service\Contract\ProcessInterface;
use PhpAmqpLib\Message\AMQPMessage;

class Worker extends OrderConnectable implements ProcessInterface
{
    use \Ipedis\Rabbit\Order\Worker;

    public static function getQueueName(): string
    {
        return OrderChannel::fromString('v1.admin.publication.generate');
    }

    protected function getProcessing(): \Closure
    {
        return function (AMQPMessage $req) {

            $this->notifyTo($req, ['status' => 'PROGRESS', 'step' => 1]);

            return ["foo" => "bar"];
        };
    }
}

```

and config as following:

```
App\Service\Worker:
    parent: Ipedis\Bundle\Rabbit\Service\Connectable\OrderConnectable
    autoconfigure: false
    autowire: true
    tags:
        - { name: "ipedis_rabbit.worker", key: "worker" }

```

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance87

Actively maintained with recent releases

Popularity6

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity88

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~46 days

Recently: every ~340 days

Total

49

Last Release

96d ago

Major Versions

1.2.18 → 2.0.02021-12-08

1.2.19 → 2.0.12022-02-02

PHP version history (4 changes)1.0.0PHP &gt;7.2.0

1.2.11PHP &gt;=7.4.0

2.0.6PHP &gt;=8.2.0

2.1.0PHP &gt;=8.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/97cc863f90ac18a7a620893a0a9cbf099dab4f8e5f853e1fe5a28c64b6dec9cc?d=identicon)[yanis-git](/maintainers/yanis-git)

---

Top Contributors

[![nadhiir-ipedis](https://avatars.githubusercontent.com/u/48116583?v=4)](https://github.com/nadhiir-ipedis "nadhiir-ipedis (31 commits)")[![tejaskgosai](https://avatars.githubusercontent.com/u/126658306?v=4)](https://github.com/tejaskgosai "tejaskgosai (19 commits)")[![MelchiorIpedis](https://avatars.githubusercontent.com/u/126576609?v=4)](https://github.com/MelchiorIpedis "MelchiorIpedis (5 commits)")[![luqayyahj](https://avatars.githubusercontent.com/u/98180558?v=4)](https://github.com/luqayyahj "luqayyahj (4 commits)")[![yanis-git](https://avatars.githubusercontent.com/u/4113879?v=4)](https://github.com/yanis-git "yanis-git (3 commits)")[![mpaletou](https://avatars.githubusercontent.com/u/10277876?v=4)](https://github.com/mpaletou "mpaletou (1 commits)")

###  Code Quality

Static AnalysisRector

### Embed Badge

![Health badge](/badges/ipedis-rabbit-client-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/ipedis-rabbit-client-bundle/health.svg)](https://phpackages.com/packages/ipedis-rabbit-client-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M648](/packages/sylius-sylius)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

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