PHPackages                             dostoevskiy-spb/yii2-smart-task-processor - 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. dostoevskiy-spb/yii2-smart-task-processor

ActiveYii2-extension[Queues &amp; Workers](/categories/queues)

dostoevskiy-spb/yii2-smart-task-processor
=========================================

Smart Task Processor with ability to live or deferred processing tasks through any of availabled transports: nats, rabbitmq, mongo, native socket

030PHP

Since Oct 2Pushed 8y ago1 watchersCompare

[ Source](https://github.com/dostoevskiy-spb/task-processor)[ Packagist](https://packagist.org/packages/dostoevskiy-spb/yii2-smart-task-processor)[ RSS](/packages/dostoevskiy-spb-yii2-smart-task-processor/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

Smart Task Processor
====================

[](#smart-task-processor)

Smart Task Processor with ability to live or deferred processing tasks through any of availabled transports: nats, rabbitmq, mongo, native socket

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

[](#installation)

The preferred way to install this extension is through [composer](http://getcomposer.org/download/).

Either run

```
php composer.phar require --prefer-dist dostoevskiy-spb/yii2-smart-task-processor "*"

```

or add

```
"dostoevskiy-spb/yii2-smart-task-processor": "*"

```

to the require section of your `composer.json` file.

Usage
-----

[](#usage)

Once the extension is installed, simply use it in your code by adding actions to any of yours controllers :

```
    /** Listner action **/
    public function actionTaskProcessor() {
        global $argv;
        $old     = $argv;
        $argv[0] = $old[1];
        $argv[1] = $argv[2];
        if (array_key_exists(3, $argv)) {
            $argv[2] = $argv[3];
        }
        $processor = Yii::$app->processor;
        $processor->listen();
    }

    /** Runner deffered task processor
     *
     * @param string $task task name form config
     */
    public function actionTaskProcessorRun($task) {
        global $argv;
        $old     = $argv;
        $argv[0] = $old[1];
        if (array_key_exists(3, $argv)) {
            $argv[1] = $argv[3];
        }
        if (array_key_exists(4, $argv)) {
            $argv[2] = $argv[4];
        }
        $processor = Yii::$app->processor;
        $processor->run($task);
    }
```

example config:

```
'processor'  => [
            'class'          => 'dostoevskiy\processor\SmartTaskProcessor',
            'tasksConfig'    => [
                'statistics'   => [
                    'class'          => 'console\components\taskProcessor\statistics\StatsProcessor',
                    'type'           => 'deferred',
                    'threads'        => 3,
                    'storage'        => 'rabbit',
                    'storageOptions' => [
                        'durable'    => false,
                        'queue'      => 'statistics',
                        'persistent' => false
                    ],
                ],
                'linkDelivery' => [
                    'class'          => 'console\components\taskProcessor\links\LinksDelivery',
                    'type'           => 'live',
                    'threads'        => 1,
                    'transactional'  => true,
                ],
            ],
            'storagesConfig' => [
                'rabbit' => [
                    'type'        => 'rabbit',
                    'credentials' => [
                        'host'     => 'localhost',
                        'port'     => 5672,
                        'user'     => 'guest',
                        'password' => 'guest',
                        'vhost'    => '/',
                    ],
                ],
            ],
            'listnerConfig'  => [
                'class'            => 'dostoevskiy\processor\src\classes\Listner',
                'type'             => 'tcp',
                'host'             => '0.0.0.0',
                'port'             => '8181',
                'threads'          => 8,
                'servicesToReload' => ['db', 'mongo', 'rabbit'],
            ],
        ],
```

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/d03fc2a2f82003dcee4529fc8c6f6e51e7cab4b768cc2e584a07ae0aaabd2435?d=identicon)[dostoevskiy-spb](/maintainers/dostoevskiy-spb)

---

Top Contributors

[![dostoevskiy-spb](https://avatars.githubusercontent.com/u/3033489?v=4)](https://github.com/dostoevskiy-spb "dostoevskiy-spb (30 commits)")

### Embed Badge

![Health badge](/badges/dostoevskiy-spb-yii2-smart-task-processor/health.svg)

```
[![Health](https://phpackages.com/badges/dostoevskiy-spb-yii2-smart-task-processor/health.svg)](https://phpackages.com/packages/dostoevskiy-spb-yii2-smart-task-processor)
```

###  Alternatives

[league/geotools

Geo-related tools PHP 7.3+ library

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

A generator parser to make streaming parsers simple.

14952.8M16](/packages/amphp-parser)[amphp/serialization

Serialization tools for IPC and data storage in PHP.

13451.1M18](/packages/amphp-serialization)[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

2238.8M171](/packages/react-async)

PHPackages © 2026

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