PHPackages                             exs/silex-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. [Framework](/categories/framework)
4. /
5. exs/silex-rabbitmq-provider

ActiveLibrary[Framework](/categories/framework)

exs/silex-rabbitmq-provider
===========================

Rabbitmq message provider bundle for Silex2

11.1kPHP

Since Jul 23Pushed 10y ago11 watchersCompare

[ Source](https://github.com/ExSituMarketing/EXS-silex-rabbitmq-provider)[ Packagist](https://packagist.org/packages/exs/silex-rabbitmq-provider)[ RSS](/packages/exs-silex-rabbitmq-provider/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

EXS-silex-rabbitmq-provider
===========================

[](#exs-silex-rabbitmq-provider)

Super simple provider for reading (consume) / writing (post) to rabbitmq from silex 2.x application.

Installing the EXS-silex-rabbitmq-provider in a Silex project
-------------------------------------------------------------

[](#installing-the-exs-silex-rabbitmq-provider-in-a-silex-project)

The installation process is actually very simple. Set up a Silex project with Composer.

Once the new project is set up, open the composer.json file and add the exs/silex-rabbitmq-provider as a dependency:

```
//composer.json
//...
"require": {
        //other bundles
        "exs/silex-rabbitmq-provider": "@dev"
```

Or you could just add it via the command line:

```
$ composer.phar require exs/silex-rabbitmq-provider ~1.0@dev

```

Save the file and have composer update the project via the command line:

```
php composer.phar update
```

Composer will now update all dependencies and you should see our bundle in the list:

```
  - Installing exs/silex-rabbitmq-provider (dev-master 463eb20)
    Cloning 463eb2081e7205e7556f6f65224c6ba9631e070a
```

Update the app.php to include the EXS-silex-rabbitmq-provider provider:

```
//app.php
//...
$app->register(new \EXS\RabbitmqProvider\Providers\Services\RabbitmqProvider());
```

Update your rabbitmq connection and environment in your config.php:

```
//...
// Rabbit MQ connection
$app['rabbit.connections'] = array(
    'default' => array(
        'host' => 'localhost',
        'port' => 5672,
        'user' => 'REPLACE_YOUR_USER_NAME',
        'password' => 'REPLACE_YOUR_PASSWORD',
        'vhost' => 'REPLACE_YOUR_VHOST_NAME'
    )
);

// rabbitmq provider environment
$app['exs.rabbitmq.env'] = array(
    'exchange' => 'REPLACE_EXCHANGE_NAME',
    'type' => 'REPLACE_EXCHANGE_TYPE',
    'queue' => 'REPLACE_QUEUE_NAME',
    'key' => 'REPLACE_ROUTING_KEY_NAME'
 );
//...
```

USAGE
-----

[](#usage)

Publish messages to the new exchange queue

```
//...
use EXS\RabbitmqProvider\Services\PostmanService;

$postman = new PostmanService();

//Publish messages to the new exchange queue
$postman->publish($YOUR_MESSAGE_HERE, false);

//Publish messages to the existing exchange queue by other rabbitmq bundle
$postman->publish($YOUR_MESSAGE_HERE);
or
$postman->publish($YOUR_MESSAGE_HERE, true);
// setting isDeclared parameter to true will declare the new exchange queue if it doesn't exist.
//...
```

Consume messages from the queue

```
//...
use EXS\RabbitmqProvider\Services\ConsumerService;

$consumer = new ConsumerService();

// Get all messages from the queue
$messages = $this->consumerService->consumeAll();
// Get 1000 messages from the queue
$messages = $this->consumerService->consumeWithLimit(1000);

// Get all messages from the existing exchange queue by other rabbitmq bundle
$messages = $this->consumerService->consumeAll(false);
or
// Get 1000 messages from the new echange queue
$messages = $this->consumerService->consumeWithLimit(1000, false);
// setting isDeclared parameter to true will declare the new exchange queue if it doesn't exist
//...
```

And now you can publish and consume messages with rabbitmq.

#### Notice

[](#notice)

This provider does not support multiple exchanges or queues.

#### Contributing

[](#contributing)

Anyone and everyone is welcome to contribute.

If you have any questions or suggestions please [let us know](http://www.ex-situ.com/).

###  Health Score

24

—

LowBetter than 32% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 84.6% 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/af284ff600087e33c35e00252ade1cc1dc3987f969661b91b036254dbe4bbb9c?d=identicon)[rumpranger](/maintainers/rumpranger)

---

Top Contributors

[![slee1803](https://avatars.githubusercontent.com/u/10144066?v=4)](https://github.com/slee1803 "slee1803 (11 commits)")[![rumpranger](https://avatars.githubusercontent.com/u/718301?v=4)](https://github.com/rumpranger "rumpranger (2 commits)")

### Embed Badge

![Health badge](/badges/exs-silex-rabbitmq-provider/health.svg)

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

###  Alternatives

[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[nolimits4web/swiper

Most modern mobile touch slider and framework with hardware accelerated transitions

41.8k177.2k1](/packages/nolimits4web-swiper)[laravel/dusk

Laravel Dusk provides simple end-to-end testing and browser automation.

1.9k36.7M259](/packages/laravel-dusk)[laravel/prompts

Add beautiful and user-friendly forms to your command-line applications.

712181.8M596](/packages/laravel-prompts)[cakephp/chronos

A simple API extension for DateTime.

1.4k47.7M121](/packages/cakephp-chronos)[laravel/pail

Easily delve into your Laravel application's log files directly from the command line.

91545.3M590](/packages/laravel-pail)

PHPackages © 2026

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