PHPackages                             caylof/php-queue - 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. caylof/php-queue

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

caylof/php-queue
================

a simple php queue base on workerman and redis stream

1.0.1(2y ago)01MITPHPPHP &gt;=8.1

Since Feb 28Pushed 2y ago1 watchersCompare

[ Source](https://github.com/caylof/php-queue)[ Packagist](https://packagist.org/packages/caylof/php-queue)[ RSS](/packages/caylof-php-queue/feed)WikiDiscussions master Synced today

READMEChangelog (2)Dependencies (6)Versions (3)Used By (0)

A simple PHP queue library
==========================

[](#a-simple-php-queue-library)

used with workerman and redis stream.

Example
-------

[](#example)

```
example
 - process.php
 - client.php
 - consumers
   - TestPrint.php

```

- make a test consumer

```
# consumers/TestPrint.php

namespace Caylof\Examples\Consumer;

use Caylof\Queue\ConsumerInterface;

class TestPrint implements ConsumerInterface
{
    public function getQueue(): string
    {
        return 'test1';
    }

    public function handle(array $data): void
    {
        if (mt_rand(0, 10) > 5) {
            throw new \Exception('test error');
        }
        var_dump($data);
    }
}
```

- queue process server

```
# process.php

require __DIR__ . '/../vendor/autoload.php';
require __DIR__ . '/consumers/TestPrint.php';

use Workerman\Worker;

Worker::$pidFile = __DIR__ . '/test_queue-pid';
Worker::$logFile = '/dev/null';
Worker::$statusFile = '/dev/null';
$worker = new Worker();
$worker->count = 1;

$worker->onWorkerStart = function(Worker $worker) {
    $redis = new Redis();
    $redis->connect('192.168.110.116', 16379);

    $logger = new \Monolog\Logger('queue');
    $logger->pushHandler(new \Monolog\Handler\StreamHandler(__DIR__ . '/queue.log'));

    $handler = new \Caylof\Queue\RedisStreamProcess(
        \Illuminate\Container\Container::getInstance(),
        $redis,
        $logger,
        __DIR__ . '/consumers',
        'Caylof\\Examples\\Consumer',
    );
    $handler->onWorkerStart();
};

Worker::runAll();
```

run server:

```
php process.php start
```

- client send message

```
# client.php

require __DIR__ . '/../vendor/autoload.php';

$redis = new Redis();
$redis->connect('192.168.110.116', 16379);

$client = new \Caylof\Queue\RedisStreamClient($redis);
$client->send('test1', ['id'=> 1, 'name' => 'cctv']);
```

run client:

```
php client.php
```

###  Health Score

21

—

LowBetter than 18% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

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 ~0 days

Total

2

Last Release

855d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/84b34fadfd3ea7bbd7067dbeb8101744819f3750b550e094da288132353e00ef?d=identicon)[caylof](/maintainers/caylof)

### Embed Badge

![Health badge](/badges/caylof-php-queue/health.svg)

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

###  Alternatives

[symfony/symfony

The Symfony PHP framework

31.4k87.2M2.2k](/packages/symfony-symfony)[laravel/framework

The Laravel Framework.

34.8k543.8M20.1k](/packages/laravel-framework)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[ecotone/ecotone

Enterprise architecture layer for Laravel and Symfony — CQRS, Event Sourcing, Durable Workflows (Sagas, Orchestrators), Projections, and Outbox messaging via PHP attributes.

564576.7k52](/packages/ecotone-ecotone)[wikimedia/parsoid

Parsoid, a bidirectional parser between wikitext and HTML5

187557.3k3](/packages/wikimedia-parsoid)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M421](/packages/drupal-core-recommended)

PHPackages © 2026

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