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

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

phpsoftbox/queue
================

Queue and worker component for the PhpSoftBox framework

057↑33.3%PHP

Since Mar 5Pushed 2mo agoCompare

[ Source](https://github.com/phpsoftbox/queue)[ Packagist](https://packagist.org/packages/phpsoftbox/queue)[ RSS](/packages/phpsoftbox-queue/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

PhpSoftBox Queue
================

[](#phpsoftbox-queue)

About
-----

[](#about)

`phpsoftbox/queue` — компонент очередей и воркера для PhpSoftBox. Включает минимальный контракт очереди, модель job, in-memory очередь и адаптер для работы с БД.

Ключевые свойства:

- контракт `QueueInterface`
- модель `QueueJob` с попытками
- `Worker` с ретраями и обработкой ошибок
- `DatabaseDriver` для использования БД через компонент Database
- поддержка приоритета и отложенной доступности (available\_datetime)
- запись задач, исчерпавших попытки, через `FailedJobStoreInterface`

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

[](#quick-start)

```
use PhpSoftBox\Queue\Drivers\InMemoryDriver;
use PhpSoftBox\Queue\QueueJob;
use PhpSoftBox\Queue\Worker;

$queue = new InMemoryDriver();
$queue->push(QueueJob::fromPayload(['type' => 'email', 'id' => 10]));

$worker = new Worker($queue, maxAttempts: 3);
$worker->run(function (mixed $payload): void {
    // обработка задания
});
```

Очередь в БД:

```
use PhpSoftBox\Database\Configurator\DatabaseFactory;
use PhpSoftBox\Database\Connection\ConnectionManager;
use PhpSoftBox\Queue\Drivers\DatabaseDriver;
use PhpSoftBox\Queue\DatabaseQueueSchema;

$factory = new DatabaseFactory([
    'connections' => [
        'default' => 'main',
        'main' => [
            'read' => ['dsn' => 'sqlite:///:memory:'],
            'write' => ['dsn' => 'sqlite:///:memory:'],
        ],
    ],
]);

$queue = new DatabaseDriver(new ConnectionManager($factory), new DatabaseQueueSchema(), 'main');
```

Оглавление
----------

[](#оглавление)

- [Документация](docs/index.md)
- [About](docs/01-about.md)
- [Quick Start](docs/02-quick-start.md)
- [Worker](docs/03-worker.md)
- [InMemory Queue](docs/04-in-memory.md)
- [Database Queue](docs/05-database.md)
- [CLI](docs/06-cli.md)
- [DI](docs/07-di.md)

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance57

Moderate activity, may be stable

Popularity11

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity12

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/0279d150240c97d210034878b0467462246dc14d29b5618157ff6a8be49a50e3?d=identicon)[inspector-who](/maintainers/inspector-who)

---

Top Contributors

[![inspector-who](https://avatars.githubusercontent.com/u/6973963?v=4)](https://github.com/inspector-who "inspector-who (1 commits)")

### Embed Badge

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

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

###  Alternatives

[league/geotools

Geo-related tools PHP 7.3+ library

1.4k5.3M26](/packages/league-geotools)[enqueue/enqueue

Message Queue Library

19820.0M56](/packages/enqueue-enqueue)[deliciousbrains/wp-background-processing

WP Background Processing can be used to fire off non-blocking asynchronous requests or as a background processing tool, allowing you to queue tasks.

1.1k409.8k6](/packages/deliciousbrains-wp-background-processing)[react/async

Async utilities and fibers for ReactPHP

2228.8M171](/packages/react-async)[react/promise-stream

The missing link between Promise-land and Stream-land for ReactPHP

11512.9M45](/packages/react-promise-stream)[illuminate/bus

The Illuminate Bus package.

6043.8M409](/packages/illuminate-bus)

PHPackages © 2026

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