PHPackages                             texthtml/pimple-rabbitmq-provider - 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. texthtml/pimple-rabbitmq-provider

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

texthtml/pimple-rabbitmq-provider
=================================

Silex service provider for RabbitMQ. Integrates php-amqplib/rabbitmq-bundle into Silex.

v1.0.0(9y ago)093[3 PRs](https://github.com/texthtml/pimple-rabbitmq-provider/pulls)MITPHPPHP ^5.6|^7.0

Since Dec 5Pushed 1y ago1 watchersCompare

[ Source](https://github.com/texthtml/pimple-rabbitmq-provider)[ Packagist](https://packagist.org/packages/texthtml/pimple-rabbitmq-provider)[ Docs](https://github.com/texthtml/pimple-rabbitmq-provider)[ RSS](/packages/texthtml-pimple-rabbitmq-provider/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (3)Versions (5)Used By (0)

RabbitMq Service Provider for Pimple / Silex 2
==============================================

[](#rabbitmq-service-provider-for-pimple--silex-2)

About
-----

[](#about)

This Pimple service provider incorporates the awesome [RabbitMqBundle](http://github.com/videlalvaro/RabbitMqBundle) into your application. Installing this bundle created by [Alvaro Videla](https://twitter.com/old_sound) you can use [RabbitMQ](http://www.rabbitmq.com/) messaging features in your application, using the [php-amqplib](http://github.com/videlalvaro/php-amqplib) library.

After installing this service provider, sending messages from a controller would be something like

```
$app->post('/message', function(Request $request) use ($app){
    $producer = $app['rabbit.producer']['my_exchange_name'];
    $producer->publish('Some message');

    return new Response($msg_body);
});
```

Later when you want to consume 50 messages out of the queue names 'my\_queue', you just run on the CLI:

```
$ ./app/console rabbitmq:consumer -m 50 my_queue
```

To learn what you can do with the bundle, please read the bundle's [README](https://github.com/videlalvaro/RabbitMqBundle/blob/master/README.md).

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

[](#installation)

Require the library with Composer:

```
$ composer require texthtml/pimple-rabbitmq-provider

```

Then, to activate the service, register the service provider after creating your Pimple Container. With Silex 2:

```
use Silex\Application;
use TH\RabbitmqProvider\RabbitServiceProvider;

$app = new Application();
$app->register(new RabbitServiceProvider());
```

Start sending messages ;)

Usage
-----

[](#usage)

In the [README](https://github.com/videlalvaro/RabbitMqBundle/blob/master/README.md) file from the Symfony bundle you can see all the available options. For example, to configure our service with two different connections and a couple of producers, and one consumer, we will pass the following configuration:

```
$app->register(new RabbitServiceProvider(), [
    'rabbit.connections' => [
        'default' => [
            'host'      => 'localhost',
            'port'      => 5672,
            'user'      => 'guest',
            'password'  => 'guest',
            'vhost'     => '/'
        ],
        'another' => [
            'host'      => 'another_host',
            'port'      => 5672,
            'user'      => 'guest',
            'password'  => 'guest',
            'vhost'     => '/'
        ]
    ],
    'rabbit.producers' => [
        'first_producer' => [
            'connection'        => 'another',
            'exchange_options'  => ['name' => 'a_exchange', 'type' => 'topic']
        ],
        'second_producer' => [
            'connection'        => 'default',
            'exchange_options'  => ['name' => 'a_exchange', 'type' => 'topic']
        ],
    ],
    'rabbit.consumers' => [
        'a_consumer' => [
            'connection'        => 'default',
            'exchange_options'  => ['name' => 'a_exchange','type' => 'topic'],
            'queue_options'     => ['name' => 'a_queue', 'routing_keys' => ['foo.#']],
            'callback'          => 'your_consumer_service'
        ]
    ]
]);
```

Keep in mind that the callback that you choose in the consumer needs to be a service that has been registered in the Pimple container. Consumer services implement the ConsumerInterface, which has a execute() public method.

Credits
-------

[](#credits)

- [RabbitMqBundle](https://github.com/php-amqplib/RabbitMqBundle) bundle, originally by [Alvaro Videla](https://twitter.com/old_sound)
- [rabbitmq-service-provider](https://github.com/e-Sixt/rabbitmq-service-provider) by fiunchinho &amp; AntonStoeckl

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity9

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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

Unknown

Total

1

Last Release

3445d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3943b5c35797d1ede53aaed3d6812e4cf5b2dba7619a00dc7a381480a7b3d330?d=identicon)[mathroc](/maintainers/mathroc)

---

Top Contributors

[![AntonStoeckl](https://avatars.githubusercontent.com/u/776322?v=4)](https://github.com/AntonStoeckl "AntonStoeckl (19 commits)")[![fiunchinho](https://avatars.githubusercontent.com/u/627038?v=4)](https://github.com/fiunchinho "fiunchinho (19 commits)")[![mathroc](https://avatars.githubusercontent.com/u/291531?v=4)](https://github.com/mathroc "mathroc (1 commits)")[![text-html-renovate[bot]](https://avatars.githubusercontent.com/u/6465918?v=4)](https://github.com/text-html-renovate[bot] "text-html-renovate[bot] (1 commits)")[![williamespindola](https://avatars.githubusercontent.com/u/794521?v=4)](https://github.com/williamespindola "williamespindola (1 commits)")[![kpacha](https://avatars.githubusercontent.com/u/1307694?v=4)](https://github.com/kpacha "kpacha (1 commits)")[![AlexStansfield](https://avatars.githubusercontent.com/u/4319443?v=4)](https://github.com/AlexStansfield "AlexStansfield (1 commits)")

---

Tags

messagequeuerabbitmqproviderAMQPsilexpimple

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/texthtml-pimple-rabbitmq-provider/health.svg)

```
[![Health](https://phpackages.com/badges/texthtml-pimple-rabbitmq-provider/health.svg)](https://phpackages.com/packages/texthtml-pimple-rabbitmq-provider)
```

###  Alternatives

[php-amqplib/rabbitmq-bundle

Integrates php-amqplib with Symfony &amp; RabbitMq. Formerly emag-tech-labs/rabbitmq-bundle, oldsound/rabbitmq-bundle.

1.3k20.1M65](/packages/php-amqplib-rabbitmq-bundle)[bunny/bunny

Performant pure-PHP AMQP (RabbitMQ) non-blocking ReactPHP library

7426.5M37](/packages/bunny-bunny)[pdezwart/php-amqp

PHP AMQP Binding Library

585242.0k2](/packages/pdezwart-php-amqp)[php-amqp/php-amqp

PHP AMQP Binding Library

5855.1k](/packages/php-amqp-php-amqp)[kdyby/rabbitmq

Integrates php-amqplib with RabbitMq and Nette Framework

30693.1k4](/packages/kdyby-rabbitmq)

PHPackages © 2026

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