2017 © Pedro PelΓ‘ez
 

library rabbitmq-supervisor-bundle

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

image

phobetor/rabbitmq-supervisor-bundle

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

  • Sunday, June 3, 2018
  • by Phobetor
  • Repository
  • 12 Watchers
  • 73 Stars
  • 104,482 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 25 Forks
  • 5 Open issues
  • 20 Versions
  • 14 % Grown

The README.md

RabbitMQ supervisor bundle

Latest Stable Version License, (*1)

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

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, (*3)

$ 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., (*4)

Installation

Install supervisor. e. g. on debian based distributions via apt-get:, (*5)

# apt-get install supervisor

Add bundle via composer, (*6)

$ php composer require phobetor/rabbitmq-supervisor-bundle

This will install the bundle to your project’s vendor directory., (*7)

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

// app/AppKernel.php

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

Symfony 5:, (*9)

// config/bundles.php
return [
    ...
    Phobetor\RabbitMqSupervisorBundle\RabbitMqSupervisorBundle::class => ["all" => true],
    ...
];

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:, (*10)

supervisor/
└── dev
    β”œβ”€β”€ logs
    β”‚Β Β  β”œβ”€β”€ stderr.log
    β”‚Β Β  └── stdout.log
    β”œβ”€β”€ supervisord.conf
    β”œβ”€β”€ supervisord.log
    β”œβ”€β”€ supervisor.pid
    β”œβ”€β”€ supervisor.sock
    └── worker
        β”œβ”€β”€ queue1.conf
        β”œβ”€β”€ queue2.conf
        β”œβ”€β”€ queue3.conf
        └── queue4.conf

If you want to use the standard structure inside of the var/ directory, change the configuration like this:, (*11)

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, (*12)

$ 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., (*13)

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., (*14)

Usage

Build or rebuild the supervisor and worker configuration and start the daemon:, (*15)

$ console rabbitmq-supervisor:rebuild

Control the supervisord daemon:, (*16)

$ console rabbitmq-supervisor:control stop
$ console rabbitmq-supervisor:control start
$ console rabbitmq-supervisor:control restart
$ console rabbitmq-supervisor:control hup

The Versions

03/06 2018

dev-master

9999999-dev https://github.com/Phobetor/rabbitmq-supervisor-bundle

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

  Sources   Download

MIT

The Requires

 

rabbitmq symfony2 symfony3 supervisor supervisord symfony4

22/05 2018

3.1.0

3.1.0.0 https://github.com/Phobetor/rabbitmq-supervisor-bundle

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

  Sources   Download

MIT

The Requires

 

rabbitmq symfony2 symfony3 supervisor supervisord symfony4

21/05 2018

dev-add-configuration-for-php-executable

dev-add-configuration-for-php-executable https://github.com/Phobetor/rabbitmq-supervisor-bundle

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

  Sources   Download

MIT

The Requires

 

rabbitmq symfony2 symfony3 supervisor supervisord symfony4

10/05 2018

3.0.0

3.0.0.0 https://github.com/Phobetor/rabbitmq-supervisor-bundle

Symfony 2 bundle to automatically create and update supervisor configurations for RabbitMQ consumer daemons

  Sources   Download

MIT

The Requires

 

rabbitmq symfony2 supervisor supervisord

07/01 2017

2.0.0

2.0.0.0 https://github.com/Phobetor/rabbitmq-supervisor-bundle

Symfony 2 bundle to automatically create and update supervisor configurations for RabbitMQ consumer daemons

  Sources   Download

MIT

The Requires

 

rabbitmq symfony2 supervisor supervisord

13/07 2016

1.5.2

1.5.2.0 https://github.com/Phobetor/rabbitmq-supervisor-bundle

Symfony 2 bundle to automatically create and update supervisor configurations for RabbitMQ consumer daemons

  Sources   Download

MIT

The Requires

 

rabbitmq symfony2 supervisor supervisord

06/01 2016

1.5.1

1.5.1.0 https://github.com/Phobetor/rabbitmq-supervisor-bundle

Symfony 2 bundle to automatically create and update supervisor configurations for RabbitMQ consumer daemons

  Sources   Download

MIT

The Requires

 

rabbitmq symfony2 supervisor supervisord

04/01 2016

1.5.0

1.5.0.0 https://github.com/Phobetor/rabbitmq-supervisor-bundle

Symfony 2 bundle to automatically create and update supervisor configurations for RabbitMQ consumer daemons

  Sources   Download

MIT

The Requires

 

rabbitmq symfony2 supervisor supervisord

04/12 2015

1.4.0

1.4.0.0 https://github.com/Phobetor/rabbitmq-supervisor-bundle

Symfony 2 bundle to automatically create and update supervisor configurations for RabbitMQ consumer daemons

  Sources   Download

MIT

The Requires

 

rabbitmq symfony2 supervisor supervisord

12/07 2015

1.3.0

1.3.0.0 https://github.com/Phobetor/rabbitmq-supervisor-bundle

Symfony 2 bundle to automatically create and update supervisor configurations for RabbitMQ consumer daemons

  Sources   Download

MIT

The Requires

 

rabbitmq symfony2 supervisor supervisord

02/09 2014

1.2.0

1.2.0.0 https://github.com/Phobetor/rabbitmq-supervisor-bundle

Symfony 2 bundle to automatically create and update supervisor configurations for RabbitMQ consumer daemons

  Sources   Download

MIT

The Requires

 

rabbitmq symfony2 supervisor supervisord

01/08 2014

1.1.6

1.1.6.0 https://github.com/Phobetor/rabbitmq-supervisor-bundle

Symfony 2 bundle to automatically create and update supervisor configurations for RabbitMQ consumer daemons

  Sources   Download

MIT

The Requires

 

rabbitmq symfony2 supervisor supervisord

31/07 2014

1.1.5

1.1.5.0 https://github.com/Phobetor/rabbitmq-supervisor-bundle

Symfony 2 bundle to automatically create and update supervisor configurations for RabbitMQ consumer daemons

  Sources   Download

MIT

The Requires

 

rabbitmq symfony2 supervisor supervisord

31/07 2014

1.1.4

1.1.4.0 https://github.com/Phobetor/rabbitmq-supervisor-bundle

Symfony 2 bundle to automatically create and update supervisor configurations for RabbitMQ consumer daemons

  Sources   Download

MIT

The Requires

 

rabbitmq symfony2 supervisor supervisord

31/07 2014

1.1.3

1.1.3.0 https://github.com/Phobetor/rabbitmq-supervisor-bundle

Symfony 2 bundle to automatically create and update supervisor configurations for RabbitMQ consumer daemons

  Sources   Download

MIT

The Requires

 

rabbitmq symfony2 supervisor supervisord

30/07 2014

1.1.2

1.1.2.0 https://github.com/Phobetor/rabbitmq-supervisor-bundle

Symfony 2 bundle to automatically create and update supervisor configurations for RabbitMQ consumer daemons

  Sources   Download

MIT

The Requires

 

rabbitmq symfony2 supervisor supervisord

29/07 2014

1.1.1

1.1.1.0 https://github.com/Phobetor/rabbitmq-supervisor-bundle

Symfony 2 bundle to automatically create and update supervisor configurations for RabbitMQ consumer daemons

  Sources   Download

MIT

The Requires

 

rabbitmq symfony2 supervisor supervisord

29/07 2014

1.1.0

1.1.0.0 https://github.com/Phobetor/rabbitmq-supervisor-bundle

Symfony 2 bundle to automatically create and update supervisor configurations for RabbitMQ consumer daemons

  Sources   Download

MIT

The Requires

 

rabbitmq symfony2 supervisor supervisord

28/07 2014

1.0.1

1.0.1.0 https://github.com/Phobetor/rabbitmq-supervisor-bundle

Symfony 2 bundle to automatically create and update supervisor configurations for RabbitMQ consumer daemons

  Sources   Download

MIT

The Requires

 

rabbitmq symfony2 supervisor supervisord

28/07 2014

1.0.0

1.0.0.0 https://github.com/Phobetor/rabbitmq-supervisor-bundle

Symfony 2 bundle to automatically create and update supervisor configurations for RabbitMQ consumer daemons

  Sources   Download

MIT

The Requires

 

rabbitmq symfony2 supervisor supervisord