PHPackages                             switon/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. [Caching](/categories/caching)
4. /
5. switon/queue

ActiveLibrary[Caching](/categories/caching)

switon/queue
============

Redis-backed job queue with runner discovery and worker commands for Switon Framework

v1.0.0(1mo ago)021MITPHPPHP &gt;=8.3CI passing

Since Jun 6Pushed 2mo agoCompare

[ Source](https://github.com/switon-php/queue)[ Packagist](https://packagist.org/packages/switon/queue)[ Docs](https://github.com/switon-php/queue)[ RSS](/packages/switon-queue/feed)WikiDiscussions main Synced 3w ago

READMEChangelogDependencies (9)Versions (2)Used By (1)

Switon Queue Package
====================

[](#switon-queue-package)

[![CI](https://camo.githubusercontent.com/477e36a7b92f22af147e60b5ac4260d43994e8d16ce26eb34061fd39d5aa22db/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f737769746f6e2d7068702f71756575652f63692e796d6c3f6272616e63683d6d61696e266c6162656c3d4349)](https://github.com/switon-php/queue/actions/workflows/ci.yml) [![PHP 8.3+](https://camo.githubusercontent.com/c03f51341eebaefabbf137e291b20523fc74b4ffd084406d88524d266d95085d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e332532422d373737424234)](https://www.php.net/)

Switon's Redis-backed queue transport for named queues, job discovery, delayed delivery, and worker/CLI execution.

Highlights
----------

[](#highlights)

- **Named queues:** push, pull, consume, and delay all use logical queue names.
- **Envelope metadata:** each job keeps its body, headers, message id, queue name, and timestamp together.
- **Job discovery:** `#[Queued]` binds runner jobs to logical queues.
- **Delayed delivery:** delayed jobs can be surfaced back into the active queue.
- **Worker and stats flow:** CLI commands cover `queue:stats`, `queue:push`, `queue:run`, `queue:work`, and `queue:migrate-due`.

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

[](#installation)

```
composer require switon/queue
```

Quick Start
-----------

[](#quick-start)

```
use Switon\Core\Attribute\Autowired;
use Switon\Core\RunnerInterface;
use Switon\Queue\Attribute\Queued;
use Switon\Queue\QueueEnvelope;
use Switon\Queue\QueueInterface;

class UserService
{
    #[Autowired] protected QueueInterface $queue;

    public function register(int $userId): void
    {
        $this->queue->push('emails', QueueEnvelope::of(['userId' => $userId]));
    }
}

#[Queued('emails')]
class SendWelcomeEmail implements RunnerInterface
{
    /**
     * @param QueueEnvelope $payload
     */
    public function run(mixed $payload): mixed
    {
        $userId = $payload->body['userId'] ?? null;

        return null;
    }
}
```

Docs:

License
-------

[](#license)

MIT.

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance87

Actively maintained with recent releases

Popularity3

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

48d ago

### Community

Maintainers

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

---

Top Contributors

[![switon-php](https://avatars.githubusercontent.com/u/247358032?v=4)](https://github.com/switon-php "switon-php (5 commits)")

---

Tags

jobsqueueredisswitonredisqueuejobsswiton

###  Code Quality

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[enqueue/redis

Message Queue Redis Transport

445.7M32](/packages/enqueue-redis)[mjphaynes/php-resque

Redis backed library for creating background jobs and processing them later.

228201.4k2](/packages/mjphaynes-php-resque)[javibravo/simpleue

Php package to manage queue tasks in a simple way

131348.6k1](/packages/javibravo-simpleue)[pdffiller/qless-php

PHP Bindings for qless

29113.7k2](/packages/pdffiller-qless-php)[resquebundle/resque

A Symfony 4 bundle to manage Resque job queues

51139.4k1](/packages/resquebundle-resque)[spinx/sidekiq-job-php

Push and schedule jobs to Sidekiq from PHP

37236.2k](/packages/spinx-sidekiq-job-php)

PHPackages © 2026

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