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

ActiveSymfony-bundle

arthem/rabbit-bundle
====================

Simple RabbitMQ bundle

0.3.0(2y ago)015.4k[1 PRs](https://github.com/4rthem/rabbit-bundle/pulls)MITPHPPHP &gt;=7.4

Since May 28Pushed 2y agoCompare

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

READMEChangelog (10)Dependencies (10)Versions (17)Used By (0)

ArthemRabbitBundle
==================

[](#arthemrabbitbundle)

A simple and faster setup to work with consumer through handlers.

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

[](#installation)

```
composer require arthem/rabbit-bundle
```

Add auto-tag feature:

```
# config/services.yaml

services:
    # ...
    _instanceof:
        # ...
        Arthem\Bundle\RabbitBundle\Consumer\Event\EventMessageHandlerInterface:
            tags: ['arthem_rabbit.event_handler']
```

Handlers
--------

[](#handlers)

Every message are based on type which allow to define their corresponding handler. A handler can support multiple types. Handlers and types can be split into queues

By default, this bundle configures:

- one queue named `event`
- its direct exchange named `x-event`
- the corresponding consumer named `event`

In opposite to RabbitMQBundle, this one provides only one message producer. The message type allows to send message to the appropriate exchange.

Failure
-------

[](#failure)

Failed message processing can be logged in a database table.

First enable the feature:

```
# config/packages/arthem_rabbit.yaml

arthem_rabbit:
    failure: ~
```

Create your own Entity which must implement `Arthem\Bundle\RabbitBundle\Model\FailedEventInterface`:

```
