PHPackages                             disqontrol/disqontrol - 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. disqontrol/disqontrol

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

disqontrol/disqontrol
=====================

A user-friendly framework for running background jobs in any language.

0.3.3(9y ago)3114MITPHPPHP &gt;=5.5.0

Since Dec 27Pushed 9y ago2 watchersCompare

[ Source](https://github.com/disqontrol/disqontrol)[ Packagist](https://packagist.org/packages/disqontrol/disqontrol)[ Docs](https://github.com/disqontrol/disqontrol)[ RSS](/packages/disqontrol-disqontrol/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (17)Versions (11)Used By (0)

Disqontrol
==========

[](#disqontrol)

[![Latest Version on Packagist](https://camo.githubusercontent.com/f50956ef98d6ccc8a038f211267476103a8d89a8ca6d2645cb81991f2903cd5c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f646973716f6e74726f6c2f646973716f6e74726f6c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/disqontrol/disqontrol)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/21c9f377ada89a3b76c71fcbd66df931e43b9d7f7ff4ece9fc886c783ee76f8f/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f646973716f6e74726f6c2f646973716f6e74726f6c2f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/disqontrol/disqontrol)[![Quality Score](https://camo.githubusercontent.com/c3c3db4a869b09ba27ecd87da4bdc46e77828cb3f29d82035c7bba6d8e507a13/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f646973716f6e74726f6c2f646973716f6e74726f6c2e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/disqontrol/disqontrol)[![Total Downloads](https://camo.githubusercontent.com/5bd35e55c5fe91ed1f0788bfcdb393a2b4db78d00c6739489b7d20dae2c2b6e6/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f646973716f6e74726f6c2f646973716f6e74726f6c2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/disqontrol/disqontrol)

Introduction
------------

[](#introduction)

Disqontrol is a user-friendly framework for running background jobs in any language.

Imagine your user has just uploaded a large picture and you want to create four other pictures from it. But the pictures are not needed immediately and you don't want to keep the user waiting for the server response.

Instead of processing the picture right now and delaying the response to the user, you create a background job and respond to the user without waiting for the result. The background job will be picked up by another program that will process the picture without delaying your main application.

There are five steps in this process:

1. Creating a background job
2. Storing it
3. Picking it up from the storage
4. Processing it
5. Handling failed jobs

Where does Disqontrol come in?

Ad 1. Disqontrol helps you create a new background job, either from PHP by using the Disqontrol producer, or from a command line. You can also add the job with your own preferred library.

Adding a job in PHP:

```
$producer->add(new Job('example-pic.png', 'resize-pic'));
```

Adding a job from the command line:

```
disqontrol addjob resize-pic '"example-pic.png"'
```

Ad 2. The job is stored in Disque, a specialized job queue created by the author of Redis.

Ad 3. The job is picked up by a Disqontrol consumer, a long-running process that listens to Disque, picks up jobs coming in and decides who should process them.

Configuration:

```
queues:
    'resize-pic':
        worker:
            type: isolated_php_worker
            name: 'resize_pic_worker'
```

Ad 4. The code for processing a job - the worker - is ultimately your responsibility, but Disqontrol provides a helpful scaffolding to write your own workers, so you can just concentrate on the processing itself. Just follow the interface.

The simplest PHP worker for resizing pictures:

```
class ResizePicWorker implements WorkerInterface
{
    public function process(JobInterface $job)
    {
        $picFileName = $job->getBody();
        // Concrete implementation left out
        return $this->resize($picFileName);
    }
}
```

Ad 5. It's important to decide what to do with failed jobs. Even though the jobs are running in the background, some of them must be processed, some make only sense for a certain amount of time and some of them are optional. Disqontrol helps you configure failure handling for each job type individually, as well as set a reasonable default behavior.

Features
--------

[](#features)

Disqontrol is written in PHP and uses [Disque](https://github.com/antirez/disque) as its underlying job queue.

With Disqontrol you get the following features:

- [Process jobs in any programming language](docs/04-ProcessingJobs.md#processing-jobs-in-languages-other-than-php)
- [Schedule jobs and run them regularly](docs/05-SchedulingJobs.md)
- [Write PHP workers with all the scaffolding already in place](docs/04-ProcessingJobs.md#using-php-workers)
- [Configure the lifecycle of a job in detail](docs/02-Configuration.md#queue-defaults)
- [Handle failures robustly](docs/06-FailureHandling.md)
- [Process new jobs immediately for development and debugging](docs/07-Debugging.md)
- Run multiple jobs from one queue in parallel
- Switch automatically to the best Disque node

Workers can be called via a command line and can therefore be written in any language. The library also provides convenient scaffolding for workers written in PHP.

The goal of Disqontrol is to be a user-friendly, clean and robust tool.

Disqontrol follows semantic versioning.

Documentation
-------------

[](#documentation)

- [Introduction](docs/index.md#introduction)
- [Features](docs/index.md#features)
- [Terminology](docs/index.md#terminology)
- [Requirements](docs/01-GettingStarted.md#requirements)
- [Installation](docs/01-GettingStarted.md#installation)
- [Getting started](docs/01-GettingStarted.md#getting-started)
- [Configuration](docs/02-Configuration.md)
- [Adding new jobs](docs/03-AddingJobs.md)
- [Processing jobs](docs/04-ProcessingJobs.md)
- [Scheduled jobs](docs/05-SchedulingJobs.md)
- [What happens with failed jobs?](docs/06-FailureHandling.md)
- [Debugging jobs in a synchronous mode](docs/07-Debugging.md)

Why Disque?
-----------

[](#why-disque)

There are many general message queues - RabbitMQ, ZeroMQ, IronMQ, Amazon SQS. Redis also has a queue functionality. Some libraries even offer databases as queue backends.

General message queues treat a job just like a message and the job workflow must be simulated in libraries.

Each queue implementation has different features and weaknesses. Queue libraries usually allow you to choose from different backends and try to make up for missing features in the code. This leads to the problem of a common denominator, unnecessary complexity and doesn't allow one to use the features of one queue fully.

That's why we have decided to use just one queue - Disque - written by the developer of Redis.

For the above mentioned reasons, we have no plans to support other queues. Instead we want to fully use all features of Disque.

Roadmap
-------

[](#roadmap)

The following features are planned for the 1.0 release:

- Consumers pick up jobs and call workers
- Supervisor keeps Consumers alive
- Consumers quit gracefully
- Isolated and inline PHP workers
- Command-line workers
- Failing jobs re-enqueued with exponential backoff
- Disqontrol has access to a PHP app environment
- Scheduled repeated jobs
- Synchronous mode
- HTTP workers (a job can be processed by an HTTP call)
- Autoscaling of consumers ("just" the algorithm is missing, see `Disqontrol\Consumer\Autoscale\PredictiveAutoscaling`)
- Using custom failure strategies (see `Disqontrol\Dispatcher\JobDispatcher`and `Disqontrol\Dispatcher\Failure\FailureStrategyCollection`)
- The `--config` parameter (for installations not using the bootstrap file, eg. teams not writing PHP code)

Change log
----------

[](#change-log)

Please see the [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [All Contributors](../../contributors)
- Big thanks to Antirez for [Disque](https://github.com/antirez/disque)
- Big thanks to Mariano for [Disque-php](https://github.com/mariano/disque-php)
- Thanks to Martin Patera for kicking off the work

Alternatives
------------

[](#alternatives)

For similar libraries in PHP, have a look at

- [Bernard](https://bernard.readthedocs.org/)
- [PHP-Queue](https://github.com/CoderKungfu/php-queue)
- [php-resque](https://github.com/chrisboulton/php-resque)
- [php-enqueue](https://github.com/php-enqueue/enqueue-dev)

For libraries in other languages, have a look at

- [Resque](https://github.com/resque/resque) in Ruby
- [Celery](https://celery.readthedocs.org/en/latest/) in Python

License
-------

[](#license)

The MIT License (MIT). Please see the [License](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity54

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 91.7% 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 ~2 days

Total

9

Last Release

3407d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/b236c810a85b205adc816209899cf6bcb75b52b2e74175d0ffd8b03710ba0f44?d=identicon)[Revisor](/maintainers/Revisor)

---

Top Contributors

[![Revisor](https://avatars.githubusercontent.com/u/550341?v=4)](https://github.com/Revisor "Revisor (121 commits)")[![mzstic](https://avatars.githubusercontent.com/u/4610204?v=4)](https://github.com/mzstic "mzstic (6 commits)")[![elcuro](https://avatars.githubusercontent.com/u/69106?v=4)](https://github.com/elcuro "elcuro (5 commits)")

---

Tags

background-jobsdisquejob-queuephpqueuescheduled-jobsscheduled-tasksqueuejobtaskdisquedisqontrol

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/disqontrol-disqontrol/health.svg)

```
[![Health](https://phpackages.com/badges/disqontrol-disqontrol/health.svg)](https://phpackages.com/packages/disqontrol-disqontrol)
```

###  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)[contao/core-bundle

Contao Open Source CMS

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

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[jolicode/castor

A lightweight and modern task runner. Automate everything. In PHP.

53541.0k3](/packages/jolicode-castor)

PHPackages © 2026

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