PHPackages                             marlonfan/disque-php - 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. marlonfan/disque-php

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

marlonfan/disque-php
====================

PHP library for Disque, an in-memory, distributed job queue

2.0.4(7y ago)0596MITPHPPHP &gt;=5.5

Since May 4Pushed 7y agoCompare

[ Source](https://github.com/marlonfan/disque-php)[ Packagist](https://packagist.org/packages/marlonfan/disque-php)[ Docs](https://github.com/mariano/disque-php)[ RSS](/packages/marlonfan-disque-php/feed)WikiDiscussions master Synced 2w ago

READMEChangelog (1)Dependencies (3)Versions (12)Used By (0)

disque-php
==========

[](#disque-php)

[![Latest Version](https://camo.githubusercontent.com/7279a9c37e663598a928ca4ba4a3282477b360153446d5038099f17c2bb94a95/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d617269616e6f2f6469737175652d7068702e7376673f7374796c653d666c61742d737175617265)](https://github.com/mariano/disque-php/releases)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/3219646ee01d9b79c5a27a027ee93c1eb49406c4ea07c5e2aa656fc4d317c1f8/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6d617269616e6f2f6469737175652d7068702f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/mariano/disque-php)[![Coverage Status](https://camo.githubusercontent.com/b465a847bc1316fa796bf122ff83ddee304cebc25f9f3ba94d28947a2ad0e731/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f6d617269616e6f2f6469737175652d7068702e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/mariano/disque-php/code-structure)[![Quality Score](https://camo.githubusercontent.com/24c7b540b3c5312340ad517bff967f080e088d93479e58da71a0aebf6382491b/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f6d617269616e6f2f6469737175652d7068702e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/mariano/disque-php)[![Total Downloads](https://camo.githubusercontent.com/2d310dc6f669082062a4e2f77daad7244de46ea3f4c784626f35d7c0325aa5c9/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d617269616e6f2f6469737175652d7068702e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/mariano/disque-php)

A PHP library for the very promising [disque](https://github.com/antirez/disque)distributed job queue. Features:

- Support for both PHP (5.5+) and HHVM
- No dependencies: Fast connection to Disque out-of-the-box
- High level API to easily push jobs to a queue, and retrieve jobs from queues
- Easily schedule jobs for execution at a certain `DateTime`
- Use the built in `Job` class, or implement your own
- Smart node connection support based on number of jobs produced by nodes
- Connect to Disque with the built-in connection, or reutilize your existing Redis client (such as [predis](https://github.com/nrk/predis))
- Supporting all current Disque commands, and allows you to easily implement custom commands
- Fully unit tested

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

[](#installation)

```
$ composer require mariano/disque-php --no-dev
```

If you want to run its tests remove the `--no-dev` argument.

Usage
-----

[](#usage)

This library provides a [Queue API](docs/README.md#queue-api) for easy job pushing/pulling, and direct access to all Disque commands via its [Client API](docs/README.md#client-api).

Create the client:

```
use Disque\Connection\Credentials;
use Disque\Client;

$nodes = [
    new Credentials('127.0.0.1', 7711),
    new Credentials('127.0.0.1', 7712, 'password'),
];

$disque = new Client($nodes);
```

Queue a job:

```
$job = new \Disque\Queue\Job(['name' => 'Claudia']);
$disque->queue('my_queue')->push($job);
```

Schedule job to be processed at a certain time:

```
$job = new \Disque\Queue\Job(['name' => 'Mariano']);
$disque->queue('my_queue')->schedule($job, new \DateTime('+2 hours'));
```

Fetch queued jobs, mark them as processed, and keep waiting on jobs:

```
$queue = $disque->queue('my_queue');
while ($job = $queue->pull()) {
    echo "GOT JOB!";
    var_dump($job->getBody());
    $queue->processed($job);
}
```

For more information on the APIs provided, [read the full documentation](docs/README.md).

Testing
-------

[](#testing)

```
$ phpunit
```

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

[](#contributing)

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

Support
-------

[](#support)

If you need some help or even better want to collaborate, feel free to hit me on twitter: [@mgiglesias](https://twitter.com/mgiglesias)

Security
--------

[](#security)

If you discover any security related issues, please contact [@mgiglesias](https://twitter.com/mgiglesias)instead of using the issue tracker.

Acknowledgments
---------------

[](#acknowledgments)

First and foremost, [Salvatore Sanfilippo](https://twitter.com/antirez) for writing what looks to be the definite solution for job queues (thanks for all the fish [Gearman](http://gearman.org/)).

Other [disque client](https://github.com/antirez/disque#client-libraries)libraries for the inspiration.

[The PHP League](https://thephpleague.com) for an awesome `README.md` skeleton, and tips about packaging PHP components.

A special acknolewdgment and appreciation for our [amazing contributors](https://github.com/mariano/disque-php/graphs/contributors)!

License
-------

[](#license)

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

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 80.8% 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 ~167 days

Recently: every ~331 days

Total

10

Last Release

2568d ago

Major Versions

1.3.0 → 2.0-alpha2015-11-03

### Community

Maintainers

![](https://www.gravatar.com/avatar/2505fdf97e5f342617f5bbb7449b039653bcea1986657de603c3f96f35840de3?d=identicon)[marlonfan](/maintainers/marlonfan)

---

Top Contributors

[![mariano](https://avatars.githubusercontent.com/u/18598?v=4)](https://github.com/mariano "mariano (118 commits)")[![Revisor](https://avatars.githubusercontent.com/u/550341?v=4)](https://github.com/Revisor "Revisor (22 commits)")[![dominics](https://avatars.githubusercontent.com/u/97427?v=4)](https://github.com/dominics "dominics (2 commits)")[![marlonfan](https://avatars.githubusercontent.com/u/9349370?v=4)](https://github.com/marlonfan "marlonfan (2 commits)")[![galdiolo](https://avatars.githubusercontent.com/u/448620?v=4)](https://github.com/galdiolo "galdiolo (1 commits)")[![kaecyra](https://avatars.githubusercontent.com/u/248212?v=4)](https://github.com/kaecyra "kaecyra (1 commits)")

---

Tags

queuejobdisque

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/marlonfan-disque-php/health.svg)

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

###  Alternatives

[imtigger/laravel-job-status

Laravel Job Status

5282.2M3](/packages/imtigger-laravel-job-status)[jms/job-queue-bundle

Allows to run and schedule Symfony console commands as background jobs.

3342.3M5](/packages/jms-job-queue-bundle)[mariano/disque-php

PHP library for Disque, an in-memory, distributed job queue

133118.8k2](/packages/mariano-disque-php)[clue/mq-react

Mini Queue, the lightweight in-memory message queue to concurrently do many (but not too many) things at once, built on top of ReactPHP

144766.9k4](/packages/clue-mq-react)[mpbarlow/laravel-queue-debouncer

A wrapper job for debouncing other queue jobs.

63792.6k1](/packages/mpbarlow-laravel-queue-debouncer)[tarantool/queue

PHP bindings for Tarantool Queue.

65137.2k4](/packages/tarantool-queue)

PHPackages © 2026

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