All Projects → Phobetor → Rabbitmq Supervisor Bundle

Phobetor / Rabbitmq Supervisor Bundle

Licence: mit
Symfony bundle to automatically create and update supervisor configurations for RabbitMQ consumer daemons

Projects that are alternatives of or similar to Rabbitmq Supervisor Bundle

Enqueue Bundle
[READ-ONLY] Message queue bundle for Symfony. RabbitMQ, Amazon SQS, Redis, Service bus, Async events, RPC over MQ and a lot more
Stars: ✭ 233 (+126.21%)
Mutual labels:  symfony, rabbitmq
Dtcqueuebundle
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}
Stars: ✭ 115 (+11.65%)
Mutual labels:  symfony, rabbitmq
Daemonizable Command
Daemonizable (endless running) commands for Symfony.
Stars: ✭ 189 (+83.5%)
Mutual labels:  daemon, symfony
Enqueue Dev
Message Queue, Job Queue, Broadcasting, WebSockets packages for PHP, Symfony, Laravel, Magento. DEVELOPMENT REPOSITORY - provided by Forma-Pro
Stars: ✭ 1,977 (+1819.42%)
Mutual labels:  symfony, rabbitmq
Swarrotbundle
A symfony bundle for swarrot integration
Stars: ✭ 89 (-13.59%)
Mutual labels:  symfony, rabbitmq
Crosscontainerextension
⚔️ [DEPRECATED] Makes possible to inject services and parameters from other containers.
Stars: ✭ 97 (-5.83%)
Mutual labels:  symfony
Springboot Templates
springboot和dubbo、netty的集成,redis mongodb的nosql模板, kafka rocketmq rabbit的MQ模板, solr solrcloud elasticsearch查询引擎
Stars: ✭ 100 (-2.91%)
Mutual labels:  rabbitmq
Scaleable Crawler With Docker Cluster
a scaleable and efficient crawelr with docker cluster , crawl million pages in 2 hours with a single machine
Stars: ✭ 96 (-6.8%)
Mutual labels:  rabbitmq
Polyfill
PHP polyfills
Stars: ✭ 1,333 (+1194.17%)
Mutual labels:  symfony
Springboot Quartz
quartz + springboot + RabbitMQ + H2(in-memory database) + dynamic task management web console.
Stars: ✭ 103 (+0%)
Mutual labels:  rabbitmq
Search
PHP search-systems made possible
Stars: ✭ 101 (-1.94%)
Mutual labels:  symfony
Easy Doc Bundle
Symfony application documentation generator
Stars: ✭ 99 (-3.88%)
Mutual labels:  symfony
Microwork
Microwork - simple creation of distributed scalable microservices in node.js with RabbitMQ
Stars: ✭ 97 (-5.83%)
Mutual labels:  rabbitmq
Quiz
Example real time quiz application with .NET Core, React, DDD, Event Sourcing, Docker and built-in infrastructure for CI/CD with k8s, jenkins and helm
Stars: ✭ 100 (-2.91%)
Mutual labels:  rabbitmq
Go Daemon
A library for writing system daemons in golang.
Stars: ✭ 1,341 (+1201.94%)
Mutual labels:  daemon
Freeradius Server
FreeRADIUS - A multi-protocol policy server.
Stars: ✭ 1,379 (+1238.83%)
Mutual labels:  daemon
Nomad Firehose
Firehose all nomad job, allocation, nodes and evaluations changes to rabbitmq, kinesis or stdout
Stars: ✭ 96 (-6.8%)
Mutual labels:  rabbitmq
Symfony1 Docs
Documentation for symfony 1.3/1.4
Stars: ✭ 98 (-4.85%)
Mutual labels:  symfony
Gentelella
Welcome to Gentelella - Responsive Bootstrap Admin Application based on the Foundation of Symfony and Gentelella!
Stars: ✭ 100 (-2.91%)
Mutual labels:  symfony
Passwordstrengthvalidator
Password-strength validator for Symfony
Stars: ✭ 98 (-4.85%)
Mutual labels:  symfony

RabbitMQ supervisor bundle

Latest Stable Version License

Symfony bundle to automatically create and update supervisor configurations for php-amqplib/rabbitmq-bundle (and its predecessor oldsound/rabbitmq-bundle) RabbitMQ consumer daemons.

In a nutshell | tl;dr

If you use php-amqplib/rabbitmq-bundle to handle the communication with RabbitMQ, just install supervisor, add this bundle and run

$ app/console rabbitmq-supervisor:rebuild

to get a running supervisord instance that automatically manages all your consumer daemons. When your worker configuration or your code changes, run the command again and all the daemons will be updated.

Installation

Install supervisor. e. g. on debian based distributions via apt-get:

# apt-get install supervisor

Add bundle via composer

$ php composer require phobetor/rabbitmq-supervisor-bundle

This will install the bundle to your project’s vendor directory.

If your are not using Symfony Flex, also add the bundle to your project’s AppKernel:

// app/AppKernel.php

public function registerBundles()
{
    $bundles = [
        // […]
        new Phobetor\RabbitMqSupervisorBundle\RabbitMqSupervisorBundle(),
    ];
}

Zero Configuration

RabbitMQ supervisor bundle works out of the box with a predefined configuration. If you leave it this way you will end up with this directory structure:

supervisor/
└── dev
    ├── logs
    │   ├── stderr.log
    │   └── stdout.log
    ├── supervisord.conf
    ├── supervisord.log
    ├── supervisor.pid
    ├── supervisor.sock
    └── worker
        ├── queue1.conf
        ├── queue2.conf
        ├── queue3.conf
        └── queue4.conf

In symfony 2 and 3 this will be placed inside your app/ directory.

Caution with symfony 4: to not have this inside of your src/ directory you need to set the paths to suit your needs. E. g. to use the standard structure inside of the var/ directory, use this:

rabbit_mq_supervisor:
    paths:
        workspace_directory:            "%kernel.project_dir%/var/supervisor/%kernel.environment%/"
        configuration_file:             "%kernel.project_dir%/var/supervisor/%kernel.environment%/supervisord.conf"
        pid_file:                       "%kernel.project_dir%/var/supervisor/%kernel.environment%/supervisor.pid"
        sock_file:                      "%kernel.project_dir%/var/supervisor/%kernel.environment%/supervisor.sock"
        log_file:                       "%kernel.project_dir%/var/supervisor/%kernel.environment%/supervisord.log"
        worker_configuration_directory: "%kernel.project_dir%/var/supervisor/%kernel.environment%/worker/"
        worker_output_log_file:         "%kernel.project_dir%/var/supervisor/%kernel.environment%/logs/stdout.log"
        worker_error_log_file:          "%kernel.project_dir%/var/supervisor/%kernel.environment%/logs/stderr.log"

Advanced configuration

To see all configuration options run

$ console config:dump-reference RabbitMqSupervisorBundle

BC break when updating from v1.* to v2.*

If you used custom commands before version 2.0, you need to update them. In most case you can just remove everything after the command name.

BC break when updating from v2.* to v3.*

Commands will by default no longer wait for supervisord to complete. If you need this (e. g. to get feedback on errors) use the --wait-for-supervisord option.

Usage

Build or rebuild the supervisor and worker configuration and start the daemon:

$ console rabbitmq-supervisor:rebuild

Control the supervisord daemon:

$ console rabbitmq-supervisor:control stop
$ console rabbitmq-supervisor:control start
$ console rabbitmq-supervisor:control restart
$ console rabbitmq-supervisor:control hup
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].