PHPackages                             sfcod/jobqueue - 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. sfcod/jobqueue

ActiveSymfony-bundle[Queues &amp; Workers](/categories/queues)

sfcod/jobqueue
==============

Async queues for Symfony

1.3.0(3y ago)165.5k↓75%5[2 PRs](https://github.com/sfcod/jobqueue/pulls)MITPHPPHP ^7.4

Since Feb 21Pushed 1y ago1 watchersCompare

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

READMEChangelog (7)Dependencies (8)Versions (30)Used By (0)

Job Queue Bundle for Symfony
============================

[](#job-queue-bundle-for-symfony)

[![Scrutinizer Code Quality](https://camo.githubusercontent.com/ef0aaa5ebbd4727c0e3d654c5da5059b267c7f51b6be8d36c5e5384f926db2dc/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7366636f642f6a6f6271756575652f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/sfcod/jobqueue/?branch=master)[![Code Climate](https://camo.githubusercontent.com/f9e5ea6e827c8033a98b26811bab3ad8e1a39225dd65d78c1085b9e15704042f/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f7366636f642f6a6f6271756575652f6261646765732f6770612e737667)](https://codeclimate.com/github/sfcod/jobqueue)

Provides async queues implementation for Symfony (using mongodb as main storage).

#### Supported drivers (storages):

[](#supported-drivers-storages)

- [MongoDB](Doc/mongodb.md)
- [Redis](Doc/redis.md)
- [Custom](Doc/custom.md)

#### Config:

[](#config)

Register the bundle config and all available "Jobs"

```
sfcod_queue:
    drivers:
        redis: 'SfCod\QueueBundle\Connector\RedisConnector'
    connections:
        default: { driver: 'redis', collection: 'queue_jobs', queue: 'default', expire: 360, limit: 2 }

services:
#    _instanceof:
#        SfCod\QueueBundle\Base\JobInterface:
#            tags: ['sfcod.jobqueue.job']
    App\Job\:
        resource: '../src/Job/*'
        tags: ['sfcod.jobqueue.job']
```

#### Adding jobs to the queue:

[](#adding-jobs-to-the-queue)

Create your own "job" which implements SfCod\\QueueBundle\\Base\\JobInterface and run it:

```
public function someFunc(JobQueue $jobQueue) {
    $data = [...];
    $jobQueue->push(YourJob::class, $data);
}
```

where $data is a payload for your job

#### Commands:

[](#commands)

Run worker daemon with console command:

```
$ php bin/console job-queue:work
$ php bin/console job-queue:retry --id=
$ php bin/console job-queue:run-job
```

Where:

- work - command to run daemon in loop;
- retry - command to move all failed jobs back into queue, can be used with --id param to retry only single job
- run-job - command to run single job by id

#### Available events:

[](#available-events)

```
'job_queue_worker.raise_before_job': SfCod\QueueBundle\Event\JobProcessingEvent;
'job_queue_worker.raise_after_job': SfCod\QueueBundle\Event\JobProcessedEvent;
'job_queue_worker.raise_exception_occurred_job': SfCod\QueueBundle\Event\JobExceptionOccurredEvent;
'job_queue_worker.raise_failed_job': SfCod\QueueBundle\Event\JobFailedEvent;
'job_queue_worker.stop': SfCod\QueueBundle\Event\WorkerStoppingEvent;
```

#### Configurable services list (with default parameters):

[](#configurable-services-list-with-default-parameters)

##### JobQueue:

[](#jobqueue)

```
SfCod\QueueBundle\Service\JobQueue:
    public: true
    arguments:
        - '@SfCod\QueueBundle\Service\QueueManager'
```

SfCod\\QueueBundle\\Service\\JobQueue: main job queue service

##### Worker

[](#worker)

```
SfCod\QueueBundle\Worker\Worker:
    arguments:
        - '@SfCod\QueueBundle\Service\QueueManager'
        - '@SfCod\QueueBundle\Service\JobProcess'
        - '@SfCod\QueueBundle\Failer\FailedJobProviderInterface'
        - '@SfCod\QueueBundle\Handler\ExceptionHandlerInterface'
        - '@Symfony\Component\EventDispatcher\EventDispatcherInterface'
```

SfCod\\QueueBundle\\Worker\\Worker: async worker for "work" command

##### JobProcess

[](#jobprocess)

```
SfCod\QueueBundle\Service\JobProcess:
    arguments:
        - 'console'
        - '%kernel.project_dir%/bin'
        - 'php'
        - ''
```

JobProcess: default config for jobs command processor in async queues, where:

- 'console' - name of console command
- '%kernel.project\_dir%/bin' - path for console command
- 'php' - binary script
- '' - binary script arguments

##### Connector

[](#connector)

```
SfCod\QueueBundle\Connector\ConnectorInterface:
    class: SfCod\QueueBundle\Connector\RedisConnector
    arguments:
        - '@SfCod\QueueBundle\Base\JobResolverInterface'
        - '@SfCod\QueueBundle\Base\RedisDriver'
```

SfCod\\QueueBundle\\Connector\\ConnectorInterface: connector for queues' database

##### Failer

[](#failer)

```
SfCod\QueueBundle\Failer\FailedJobProviderInterface:
    class: SfCod\QueueBundle\Failer\RedisFailedJobProvider
    arguments:
        - '@SfCod\QueueBundle\Service\RedisDriver'
        - 'queue_jobs_failed'
```

SfCod\\QueueBundle\\Failer\\FailedJobProviderInterface: storage for failed jobs

##### Job resolver

[](#job-resolver)

```
SfCod\QueueBundle\Base\JobResolverInterface:
    class: SfCod\QueueBundle\Service\JobResolver
    arguments:
        - '@Symfony\Component\DependencyInjection\ContainerInterface'
```

SfCod\\QueueBundle\\Base\\JobResolverInterface: resolver for jobs, it builds job using job's display name, for default jobs fetches from container as a public services.

##### Exception handler

[](#exception-handler)

```
SfCod\QueueBundle\Handler\ExceptionHandlerInterface:
    class: SfCod\QueueBundle\Handler\ExceptionHandler
    arguments:
        - '@Psr\Log\LoggerInterface'
```

SfCod\\QueueBundle\\Handler\\ExceptionHandlerInterface: main exception handler, used for logging issues

##### Testing:

[](#testing)

You can run tests using prepared configuration xml file:

```
php bin/phpunit --configuration ./vendor/sfcod/jobqueue/phpunit.xml.dist --bootstrap ./vendor/autoload.php
```

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance29

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 53.2% 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 ~73 days

Recently: every ~192 days

Total

25

Last Release

1249d ago

PHP version history (4 changes)1.0.0PHP ^7.0

1.1.3PHP ^7.1.3

1.1.11PHP ^7.1

1.3.0PHP ^7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/7934283ca98b7f31bb5bf13119a8495cad80ac9097125a48792f47caddb588b9?d=identicon)[lexxorlov](/maintainers/lexxorlov)

---

Top Contributors

[![Mark1Z](https://avatars.githubusercontent.com/u/9988709?v=4)](https://github.com/Mark1Z "Mark1Z (50 commits)")[![lexxorlov](https://avatars.githubusercontent.com/u/7910574?v=4)](https://github.com/lexxorlov "lexxorlov (32 commits)")[![savchuknikolay](https://avatars.githubusercontent.com/u/69251655?v=4)](https://github.com/savchuknikolay "savchuknikolay (10 commits)")[![empy26](https://avatars.githubusercontent.com/u/23618057?v=4)](https://github.com/empy26 "empy26 (2 commits)")

---

Tags

async-queuephpqueuesymfonysymfony-bundle

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/sfcod-jobqueue/health.svg)

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

###  Alternatives

[shopware/platform

The Shopware e-commerce core

3.3k1.5M3](/packages/shopware-platform)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M651](/packages/sylius-sylius)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.0k15.4k](/packages/prestashop-prestashop)[kimai/kimai

Kimai - Time Tracking

4.6k7.4k1](/packages/kimai-kimai)[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

595.2M386](/packages/shopware-core)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)

PHPackages © 2026

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