myonlinestore / rabbitmq-manager-bundle
Configuration generator for RabbitMQ with Supervisord and rabbitmq-cli-consumer support
Installs: 19 445
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 7
Forks: 0
Open Issues: 0
Type:symfony-bundle
Requires
- php: >=5.5.0
- php-amqplib/rabbitmq-bundle: ~1.0
- supervisorphp/configuration: ^0.2.1
- symfony/config: ~2.7 || ~3.0
- symfony/console: ~2.7 || ~3.0
- symfony/dependency-injection: ~2.7 || ~3.0
- symfony/event-dispatcher: ~2.7 || ~3.0
- symfony/process: ~2.7 || ~3.0
- symfony/templating: ~2.7 || ~3.0
- symfony/yaml: ~2.7 || ~3.0
Requires (Dev)
- phpunit/phpunit: ~4.8
- symfony/expression-language: ~2.7 || ~3.0
- symfony/framework-bundle: ~2.7 || ~3.0
Suggests
- symfony/framework-bundle: To use this lib as a full Symfony Bundle and to use the profiler data collector
Replaces
This package is auto-updated.
Last update: 2019-03-28 11:21:46 UTC
README
Introduction
This package is based on https://github.com/Phobetor/rabbitmq-supervisor-bundle and has additional support for https://github.com/ricbra/rabbitmq-cli-consumer. To avoid runtime cache in a (more) efficient way.
Installation
Require the bundle and its dependencies with composer:
$ composer require myonlinestore/rabbitmq-manager-bundle
Register the bundle into your app/AppKernel.php
:
public function registerBundles() { $bundles = [ new MyOnlineStore\Bundle\RabbitMqManagerBundle\RabbitMqManagerBundle(), ]; }
Usage
All configuration options are optional.
Full Default Configuration
rabbit_mq_manager: path: "%kernel.root_dir%/../var/supervisor/%kernel.name%" commands: # console commands to execute for specific worker types cli_consumer_invoker: "rabbitmq-manager:consumer" # this will use the rabbitmq-cli-consumer invoker, defined within this package. consumers: "rabbitmq:consumer" # OldSoundRabbitMqBundle default consumer command rpc_servers: "rabbitmq:rpc-server" # OldSoundRabbitMqBundle default rpc-server command consumers: general: processor: "bundle" # either "bundle" or "cli-consumer" messages: 0 # amount of messages to process before restarting the consumer (only applicable for processor "bundle") compression: true # use compression (only applicable for processor "cli-consumer") worker: # http://supervisord.org/configuration.html#program-x-section-values count: 1 startsecs: 0 autorestart: true stopsignal: "INT" stopasgroup: true stopwaitsecs: 60 individual: # my_consumer: # see general configuration rpc_servers: # see consumers
Example configuration
rabbit_mq_manager: consumers: general: processor: "bundle" messages: 1 # only consume 1 message before quiting/restarting worker: # http://supervisord.org/configuration.html#program-x-section-values count: 1 individual: my_consumer: messages: 0 # don't restart "my_consumer" after consuming messages worker: count: 8 # start 8 listeners/processors for "my_consumer" my_other_consumer: processor: "cli-consumer" compression: true worker: count: 4