PHPackages                             ecommit/messenger-supervisor-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. [Queues &amp; Workers](/categories/queues)
4. /
5. ecommit/messenger-supervisor-bundle

ActiveLibrary[Queues &amp; Workers](/categories/queues)

ecommit/messenger-supervisor-bundle
===================================

Use symfony/messenger with Supervisor

v1.5.0(3mo ago)21.9k↓50%2MITPHPPHP ^8.2CI passing

Since Sep 2Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/e-commit/messenger-supervisor-bundle)[ Packagist](https://packagist.org/packages/ecommit/messenger-supervisor-bundle)[ RSS](/packages/ecommit-messenger-supervisor-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (25)Versions (10)Used By (0)

EcommitMessengerSupervisorBundle
================================

[](#ecommitmessengersupervisorbundle)

The EcommitMessengerSupervisorBundle bundle (for Symfony) manages [Messenger component](https://symfony.com/doc/current/components/messenger.html)with [Supervisor](http://supervisord.org).

[![Tests](https://github.com/e-commit/messenger-supervisor-bundle/workflows/Tests/badge.svg)](https://github.com/e-commit/messenger-supervisor-bundle/workflows/Tests/badge.svg)

Available features :

- Start Supervisor programs (workers)
- Stop Supervisor programs (workers)
- Show Supervisor programs (workers) status
- Show Supervisor programs (workers) status with Nagios format
- After worker failure :
    - Stop Supervisor program (can be disabled)
    - Send email (can be disabled)

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

[](#installation)

Install the bundle with Composer : In your project directory, execute the following command :

```
$ composer require ecommit/messenger-supervisor-bundle
```

Enable the bundle in the `config/bundles.php` file for your project :

```
return [
    //...
    Ecommit\MessengerSupervisorBundle\EcommitMessengerSupervisorBundle::class => ['all' => true],
    //...
];
```

In Supervisor configuration enable the API and add your workers (See the [Supervisor doc](http://supervisord.org) for more details):

```
;eg in /etc/supervisor/conf.d/myconf.conf
[inet_http_server]
port = 127.0.0.1:9001
username = user
password = 123

[program:program_async]
command=php /path/to/your/app/bin/console messenger:consume async
process_name=%(program_name)s_%(process_num)02d
numprocs=1
autostart=true
autorestart=true
user=ubuntu

;You can define others programs (workers) :
;[program:program_async2]
;command=php /path/to/your/app/bin/console messenger:consume async2
;process_name=%(program_name)s_%(process_num)02d
;numprocs=2
;autostart=true
;autorestart=true
;user=ubuntu
```

Configure Messenger (See the [doc](https://symfony.com/doc/current/messenger.html) for more details) and Mailer (See the [doc](https://symfony.com/doc/current/mailer.html) for more details).

In your project, add the configuration file `config/packages/ecommit_messenger_supervisor.yaml` :

```
ecommit_messenger_supervisor:
    supervisor:
        #Supervisor API configuration
        host: '127.0.0.1' #IP address - Required
        username: user #Username - Not required - Default value: null
        password: 123 #Password - Not required - Default value: null
        #port: 9001 #Port - Not required - Default value: 9001
        #timeout: 3600 #API timeout (in seconds) - Not required - Default value: 3600

    #Transports / Programs configuration :
    #Mapping "Messenger transport name" -> "Supervisor program name (group name)"
    transports:
        async: program_async #async = Messenger transport name | program_async = Supervisor program (group) name
        #Or you can set options :
        #async:
        #   failure:
        #       stop_program: true #Stop program after failure - Not required - Available values: "always", "will-not-retry" (only if the message cannot be retried), "never" - Default value : "always"
        #       send_mail: true #Send mail after failure - Not required - Available values: "always", "will-not-retry" (only if the message cannot be retried), "never" - Default value : "always"

        #You can define others programs :
        #async2: program_async2

    #Mailer configuration
    mailer:
        from: from@domain.com #Sender - Required if a program is setting with send_mail=true option
        to: to@domain.com #Recipient - Required if a program is setting with send_mail=true option
        #You can use multiple recipients:
        #to: ['to1@domain.com', 'to2@domain.com']
        #subject: "[Supervisor][][] Error" #Suject - Not required - Default value : "[Supervisor][] Error"
        # is replaced by Supervisor program (group) name
        # is replaced by server name
```

Usage
-----

[](#usage)

```
#Start a program
php bin/console ecommit:supervisor start program_async
#Start multiple programs
php bin/console ecommit:supervisor start program_async program_async2
#Start all programs
php bin/console ecommit:supervisor start  all

#Stop a program
php bin/console ecommit:supervisor stop program_async
#Stop many programs
php bin/console ecommit:supervisor stop program_async program_async2
#Stop all programs
php bin/console ecommit:supervisor stop  all

#Get status on a single program
php bin/console ecommit:supervisor status program_async
#Get status on multiple programs
php bin/console ecommit:supervisor status program_async program_async2
#Get status on all programs
php bin/console ecommit:supervisor status all
#Use can use Nagios format
php bin/console ecommit:supervisor status all --nagios
```

You can also use the `Ecommit\MessengerSupervisorBundle\Supervisor\Supervisor` service :

```
use Ecommit\MessengerSupervisorBundle\Supervisor\Supervisor;

class MyClass
{
    protected $supervisor;

    public function __construct(Supervisor $supervisor) //Supervisor service is injected
    {
        $this->supervisor = $supervisor;
    }

    public function myMethod(): void
    {
        //$this->supervisor->startProgram('program_async');
        //$this->supervisor->stopProgram('program_async');
        //$status = $this->supervisor->getProgramsStatus(['program_async']);
    }
}
```

License
-------

[](#license)

This bundle is available under the MIT license. See the complete license in the *LICENSE* file.

###  Health Score

50

—

FairBetter than 96% of packages

Maintenance83

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~203 days

Recently: every ~213 days

Total

9

Last Release

92d ago

Major Versions

v0.2.0 → v1.0.02022-07-26

PHP version history (3 changes)v0.1.0PHP ^7.3|^8.0

v1.1.1PHP ^8.1

v1.5.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/73191162d97fffaa1a23d23326a7a77fbaa94ce41e49cf4ee6cbf0b9c9800c80?d=identicon)[e-commit](/maintainers/e-commit)

---

Top Contributors

[![hlecorche](https://avatars.githubusercontent.com/u/188749?v=4)](https://github.com/hlecorche "hlecorche (70 commits)")

---

Tags

messengersupervisorsymfonysymfony-bundlesymfonySymfony BundleMessengersupervisor

###  Code Quality

TestsPHPUnit

Static AnalysisPsalm

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/ecommit-messenger-supervisor-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/ecommit-messenger-supervisor-bundle/health.svg)](https://phpackages.com/packages/ecommit-messenger-supervisor-bundle)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[sulu/sulu

Core framework that implements the functionality of the Sulu content management system

1.3k1.3M152](/packages/sulu-sulu)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[contao/core-bundle

Contao Open Source CMS

1231.6M2.4k](/packages/contao-core-bundle)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
