Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/4rthem/rabbit-bundle
Simple RabbitMQ setup Symfony bundle
https://github.com/4rthem/rabbit-bundle
Last synced: 13 days ago
JSON representation
Simple RabbitMQ setup Symfony bundle
- Host: GitHub
- URL: https://github.com/4rthem/rabbit-bundle
- Owner: 4rthem
- Created: 2019-05-28T17:05:09.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2024-03-12T20:18:33.000Z (10 months ago)
- Last Synced: 2024-11-05T14:06:28.951Z (3 months ago)
- Language: PHP
- Size: 183 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ArthemRabbitBundle
A simple and faster setup to work with consumer through handlers.
## Installation
```bash
composer require arthem/rabbit-bundle
```Add auto-tag feature:
```yaml
# config/services.yamlservices:
# ...
_instanceof:
# ...
Arthem\Bundle\RabbitBundle\Consumer\Event\EventMessageHandlerInterface:
tags: ['arthem_rabbit.event_handler']
```## 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 queuesBy 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
Failed message processing can be logged in a database table.
First enable the feature:
```yaml
# config/packages/arthem_rabbit.yamlarthem_rabbit:
failure: ~
```Create your own Entity which must implement `Arthem\Bundle\RabbitBundle\Model\FailedEventInterface`:
```php
id;
}
}
```