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

ActiveYii2-extension[Caching](/categories/caching)

qwenode/yii2-queue
==================

Yii2 Queue Extension which supported DB, Redis, RabbitMQ, Beanstalk, SQS and Gearman

2.4.0(3y ago)01BSD-3-ClausePHPPHP &gt;=5.5.0

Since Nov 1Pushed 3y agoCompare

[ Source](https://github.com/qwenode/yii2-queue)[ Packagist](https://packagist.org/packages/qwenode/yii2-queue)[ GitHub Sponsors](https://github.com/yiisoft)[ Fund](https://opencollective.com/yiisoft)[ RSS](/packages/qwenode-yii2-queue/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (12)Versions (37)Used By (0)

 [ ![](https://avatars0.githubusercontent.com/u/993323) ](https://github.com/yiisoft)

Yii2 Queue Extension
====================

[](#yii2-queue-extension)

An extension for running tasks asynchronously via queues.

It supports queues based on **DB**, **Redis**, **RabbitMQ**, **AMQP**, **Beanstalk**, **ActiveMQ** and **Gearman**.

Documentation is at [docs/guide/README.md](docs/guide/README.md).

[![Latest Stable Version](https://camo.githubusercontent.com/0d5e918086808ae4b4351d90e0c88df9035c1d4d721ce2753a532fef8e3c02be/68747470733a2f2f706f7365722e707567782e6f72672f796969736f66742f796969322d71756575652f762f737461626c652e737667)](https://packagist.org/packages/yiisoft/yii2-queue)[![Total Downloads](https://camo.githubusercontent.com/107ca7a75b24075d84b2c6794d5869d5563df59d02109bab198ca168faaa549c/68747470733a2f2f706f7365722e707567782e6f72672f796969736f66742f796969322d71756575652f646f776e6c6f6164732e737667)](https://packagist.org/packages/yiisoft/yii2-queue)[![Build Status](https://github.com/yiisoft/yii2-queue/workflows/build/badge.svg)](https://github.com/yiisoft/yii2-queue/actions)

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

[](#installation)

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

```
php composer.phar require --prefer-dist yiisoft/yii2-queue

```

Basic Usage
-----------

[](#basic-usage)

Each task which is sent to queue should be defined as a separate class. For example, if you need to download and save a file the class may look like the following:

```
class DownloadJob extends BaseObject implements \yii\queue\JobInterface
{
    public $url;
    public $file;

    public function execute($queue)
    {
        file_put_contents($this->file, file_get_contents($this->url));
    }
}
```

Here's how to send a task into the queue:

```
Yii::$app->queue->push(new DownloadJob([
    'url' => 'http://example.com/image.jpg',
    'file' => '/tmp/image.jpg',
]));
```

To push a job into the queue that should run after 5 minutes:

```
Yii::$app->queue->delay(5 * 60)->push(new DownloadJob([
    'url' => 'http://example.com/image.jpg',
    'file' => '/tmp/image.jpg',
]));
```

The exact way a task is executed depends on the used driver. Most drivers can be run using console commands, which the component automatically registers in your application.

This command obtains and executes tasks in a loop until the queue is empty:

```
yii queue/run
```

This command launches a daemon which infinitely queries the queue:

```
yii queue/listen
```

See the documentation for more details about driver specific console commands and their options.

The component also has the ability to track the status of a job which was pushed into queue.

```
// Push a job into the queue and get a message ID.
$id = Yii::$app->queue->push(new SomeJob());

// Check whether the job is waiting for execution.
Yii::$app->queue->isWaiting($id);

// Check whether a worker got the job from the queue and executes it.
Yii::$app->queue->isReserved($id);

// Check whether a worker has executed the job.
Yii::$app->queue->isDone($id);
```

For more details see [the guide](docs/guide/README.md).

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity70

Established project with proven stability

 Bus Factor1

Top contributor holds 73.9% 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 ~62 days

Recently: every ~171 days

Total

36

Last Release

1278d ago

Major Versions

0.12.2 → 1.0.02017-05-03

1.1.0 → 2.0.02017-07-15

### Community

Maintainers

![](https://www.gravatar.com/avatar/98fe00cf419706aecc2894a81f090c4d597ea6e1cfef982f74098162602731a4?d=identicon)[dtfreeman](/maintainers/dtfreeman)

---

Top Contributors

[![zhuravljov](https://avatars.githubusercontent.com/u/1656851?v=4)](https://github.com/zhuravljov "zhuravljov (325 commits)")[![samdark](https://avatars.githubusercontent.com/u/47294?v=4)](https://github.com/samdark "samdark (38 commits)")[![alexkart](https://avatars.githubusercontent.com/u/8249105?v=4)](https://github.com/alexkart "alexkart (19 commits)")[![softark](https://avatars.githubusercontent.com/u/342857?v=4)](https://github.com/softark "softark (9 commits)")[![Lesha701](https://avatars.githubusercontent.com/u/22198779?v=4)](https://github.com/Lesha701 "Lesha701 (6 commits)")[![SilverFire](https://avatars.githubusercontent.com/u/4499203?v=4)](https://github.com/SilverFire "SilverFire (5 commits)")[![s1lver](https://avatars.githubusercontent.com/u/4567634?v=4)](https://github.com/s1lver "s1lver (4 commits)")[![mikehaertl](https://avatars.githubusercontent.com/u/675062?v=4)](https://github.com/mikehaertl "mikehaertl (3 commits)")[![mkubenka](https://avatars.githubusercontent.com/u/933201?v=4)](https://github.com/mkubenka "mkubenka (2 commits)")[![aivchen](https://avatars.githubusercontent.com/u/4580308?v=4)](https://github.com/aivchen "aivchen (2 commits)")[![brandonkelly](https://avatars.githubusercontent.com/u/47792?v=4)](https://github.com/brandonkelly "brandonkelly (2 commits)")[![bscheshirwork](https://avatars.githubusercontent.com/u/5769211?v=4)](https://github.com/bscheshirwork "bscheshirwork (2 commits)")[![cebe](https://avatars.githubusercontent.com/u/189796?v=4)](https://github.com/cebe "cebe (2 commits)")[![kringkaste](https://avatars.githubusercontent.com/u/964698?v=4)](https://github.com/kringkaste "kringkaste (2 commits)")[![luke-](https://avatars.githubusercontent.com/u/4736168?v=4)](https://github.com/luke- "luke- (2 commits)")[![airani](https://avatars.githubusercontent.com/u/438573?v=4)](https://github.com/airani "airani (2 commits)")[![Tarinu](https://avatars.githubusercontent.com/u/5955598?v=4)](https://github.com/Tarinu "Tarinu (2 commits)")[![lourdas](https://avatars.githubusercontent.com/u/397916?v=4)](https://github.com/lourdas "lourdas (1 commits)")[![lar-dragon](https://avatars.githubusercontent.com/u/7447335?v=4)](https://github.com/lar-dragon "lar-dragon (1 commits)")[![SamMousa](https://avatars.githubusercontent.com/u/547021?v=4)](https://github.com/SamMousa "SamMousa (1 commits)")

---

Tags

asyncredisqueuerabbitmqdbsqsyiigiigearmanbeanstalk

###  Code Quality

TestsPHPUnit

### Embed Badge

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

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

###  Alternatives

[yiisoft/yii2-queue

Yii2 Queue Extension which supports queues based on DB, Redis, RabbitMQ, Beanstalk, SQS, and Gearman

1.1k10.4M154](/packages/yiisoft-yii2-queue)[enqueue/magento2-enqueue

Message Queue solutions for Magento2. Supports RabbitMQ, AMQP, STOMP, Amazon SQS, Kafka, Redis, Google PubSub, Gearman, Beanstalk, Google PubSub

4918.8k](/packages/enqueue-magento2-enqueue)[javibravo/simpleue

Php package to manage queue tasks in a simple way

130332.1k1](/packages/javibravo-simpleue)[bazilio/yii2-async

Provides translucent api for moving large tasks out of request context

6248.8k2](/packages/bazilio-yii2-async)

PHPackages © 2026

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