PHPackages                             florianajir/rabbitmq-sql-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. [Database &amp; ORM](/categories/database)
4. /
5. florianajir/rabbitmq-sql-bundle

ActiveSymfony-bundle[Database &amp; ORM](/categories/database)

florianajir/rabbitmq-sql-bundle
===============================

RabbitMQ to sql consumer, using doctrine/dbal and php-amqplib/rabbitmq-bundle

v1.0.0(10y ago)22.6kMITPHPPHP &gt;=5.4.0

Since May 3Pushed 3y ago2 watchersCompare

[ Source](https://github.com/florianajir/rabbitmq-sql-worker)[ Packagist](https://packagist.org/packages/florianajir/rabbitmq-sql-bundle)[ Docs](https://github.com/florianajir/rabbitmq-sql-bundle)[ RSS](/packages/florianajir-rabbitmq-sql-bundle/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (1)Dependencies (10)Versions (2)Used By (0)

Rabbitmq-sql-worker
===================

[](#rabbitmq-sql-worker)

[![Latest Stable Version](https://camo.githubusercontent.com/3f7ffc4dcd40e02058f5e98b41c28a842df03a2995a8d0be03933c3a73dfa76b/687474703a2f2f706f7365722e707567782e6f72672f666c6f7269616e616a69722f7261626269746d712d73716c2d62756e646c652f76)](https://packagist.org/packages/florianajir/rabbitmq-sql-bundle) [![Total Downloads](https://camo.githubusercontent.com/94039c78ffc1f142407f97b67510a8b987c0f2998dddc4c69cec171d7f4ffb9c/687474703a2f2f706f7365722e707567782e6f72672f666c6f7269616e616a69722f7261626269746d712d73716c2d62756e646c652f646f776e6c6f616473)](https://packagist.org/packages/florianajir/rabbitmq-sql-bundle) [![Latest Unstable Version](https://camo.githubusercontent.com/f8feb673094c88584eb322d5d904908eb997f74daf3e1a63dce68cf562fc7750/687474703a2f2f706f7365722e707567782e6f72672f666c6f7269616e616a69722f7261626269746d712d73716c2d62756e646c652f762f756e737461626c65)](https://packagist.org/packages/florianajir/rabbitmq-sql-bundle) [![License](https://camo.githubusercontent.com/c949064454ad0001d0b068058b945e0fa704c73aee5fc5acdc6d92885430955d/687474703a2f2f706f7365722e707567782e6f72672f666c6f7269616e616a69722f7261626269746d712d73716c2d62756e646c652f6c6963656e7365)](https://packagist.org/packages/florianajir/rabbitmq-sql-bundle) [![PHP Version Require](https://camo.githubusercontent.com/13a72106f006ca4b5ec0e37582f0ba44b183f7f3bc4bf911fb5bde645d38d7e2/687474703a2f2f706f7365722e707567782e6f72672f666c6f7269616e616a69722f7261626269746d712d73716c2d62756e646c652f726571756972652f706870)](https://packagist.org/packages/florianajir/rabbitmq-sql-bundle)

[![Code Coverage](https://camo.githubusercontent.com/354140e13fcc27d00b9562a15a8ccc0187a4ee94ded97ff2cf0084f8148fdcd0/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f666c6f7269616e616a69722f7261626269746d712d73716c2d776f726b65722f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/florianajir/rabbitmq-sql-worker/?branch=master) [![Scrutinizer Code Quality](https://camo.githubusercontent.com/5e01ac037be68fc6d7457b9b2cb2c4d0dd8e5806aac34c921b71c36380d7942b/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f666c6f7269616e616a69722f7261626269746d712d73716c2d776f726b65722f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/florianajir/rabbitmq-sql-worker/?branch=master)

About
-----

[](#about)

The RabbitMqSqlBundle is a symfony worker to provide rabbitmq message persistence for your application using the php-amqplib/rabbitmq-bundle and doctrine/dbal libraries.

You just need to configure the mapping in yml and execute a command, a simple and scalable rabbitmq to sql consumer to persist your entities:

```
php app/console rabbitmq:consumer -w sql

```

Features
--------

[](#features)

- mapping yml config (doctrine like)
- Insert records
- Update records
- Relational records : oneToOne, oneToMany, manyToOne, manyToMany
- Update, Delete relations
- Foreign keys support

Examples
--------

[](#examples)

Following example shows you the consuming process to persist in database a simple subscriber from an asynchronous message data.

RabbitMQ incoming message data:

```
{
  "name" : "Rogger Rabbit",
  "email" : "subscriber@acme.corp",
  "Groups": [ { "slug": "subscriber" } ]
}
```

SQL requests output:

```
INSERT INTO `members` (`name`, `email`) VALUES ("Rogger Rabbit", "subscriber@acme.corp");
INSERT INTO `member_group` (`member_id`, `group_id`) VALUES (3, 2);
```

> Take more inspiration from [Examples documentation](Resources/doc/examples.md)

License
-------

[](#license)

This application is under the MIT license. See the complete license in this file :

```
Resources/meta/LICENSE

```

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

[](#installation)

### For Symfony Framework &gt;= 2.3

[](#for-symfony-framework--23)

Require the worker and its dependencies with composer:

```
$ composer require florianajir/rabbitmq-sql-worker
```

Register this bundles:

```
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        new OldSound\RabbitMqBundle\OldSoundRabbitMqBundle(),
        new FlorianAjir\RabbitMqSqlBundle\FlorianAjirRabbitMqSqlBundle(),
    );
}
```

Configuration
-------------

[](#configuration)

You have to configure the rabbitmq and the database and define message structures and database mapping.

- [Rabbitmq-sql Configuration](Resources/doc/configuration.md)
- [Mapping Documentation](Resources/doc/configuration.md)

Enjoy !

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.8% 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

Unknown

Total

1

Last Release

3666d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/59b4c5eb6226d578b49ced0976219287e2a07aec91a52038b9093d83a39c6a66?d=identicon)[florianajir](/maintainers/florianajir)

---

Top Contributors

[![florianajir](https://avatars.githubusercontent.com/u/3715903?v=4)](https://github.com/florianajir "florianajir (127 commits)")[![methylbro](https://avatars.githubusercontent.com/u/344994?v=4)](https://github.com/methylbro "methylbro (7 commits)")[![thibaut1001](https://avatars.githubusercontent.com/u/7643039?v=4)](https://github.com/thibaut1001 "thibaut1001 (7 commits)")[![gbprod](https://avatars.githubusercontent.com/u/3751019?v=4)](https://github.com/gbprod "gbprod (6 commits)")[![scrutinizer-auto-fixer](https://avatars.githubusercontent.com/u/6253494?v=4)](https://github.com/scrutinizer-auto-fixer "scrutinizer-auto-fixer (1 commits)")

---

Tags

phprabbitmqsqlsymfonysqlrabbitmqconsumerRabbitMQ to Sql

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/florianajir-rabbitmq-sql-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/florianajir-rabbitmq-sql-bundle/health.svg)](https://phpackages.com/packages/florianajir-rabbitmq-sql-bundle)
```

###  Alternatives

[sulu/sulu

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

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

Kimai - Time Tracking

4.6k7.4k1](/packages/kimai-kimai)[mmucklo/queue-bundle

Symfony2/3/4/5 Queue Bundle (for background jobs) supporting Mongo (Doctrine ODM), Mysql (and any Doctrine ORM), RabbitMQ, Beanstalkd, Redis, and ... {write your own}

120839.8k](/packages/mmucklo-queue-bundle)[psx/sql

Generate type-safe PHP classes from your database

1773.4k4](/packages/psx-sql)[heymoon/doctrine-psql-enum

Store PHP native enums as PostgeSQL custom enum types

254.9k](/packages/heymoon-doctrine-psql-enum)

PHPackages © 2026

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