PHPackages                             bernardosecades/queue-system-bundle - 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. bernardosecades/queue-system-bundle

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

bernardosecades/queue-system-bundle
===================================

Queue System Bundle - Jobs and Workers

026PHP

Since Oct 22Pushed 9y ago1 watchersCompare

[ Source](https://github.com/bernardosecades/queue-system-bundle)[ Packagist](https://packagist.org/packages/bernardosecades/queue-system-bundle)[ RSS](/packages/bernardosecades-queue-system-bundle/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

QueueSytem for Symfony
======================

[](#queuesytem-for-symfony)

Simple queue system based on Redis

Installing/Configuring
----------------------

[](#installingconfiguring)

Version
-------

[](#version)

- Use alias of `dev-master` for last version.

Installing
----------

[](#installing)

```
wget http://download.redis.io/redis-stable.tar.gz
tar xvzf redis-stable.tar.gz
cd redis-stable
make
```

Installing bundle
-----------------

[](#installing-bundle)

You have to add require line into you composer.json file

```
"require": {
    ...
    "bernardosecades/queue-system-bundle": "dev-master"
},
```

Then you have to use composer to update your project dependencies

```
php composer.phar update
```

And register the bundle in your AppKernel.php file

```
return array(
    // ...
    new BernardoSecades\QueueSystemBundle\QueueSystemBundle(),
    // ...
);
```

Configuration
-------------

[](#configuration)

In the current version, all conections are localhost:6379, but as soon as posible connections will be configurable, the same for events. You need to configure all. By default jms serializer has the value 'Json'. In next version you will can implement custom serializer.

```
queue_system:
    # Queues definition
    queues:
        images: "queue:mail"
        api: "queue:api"

    # Server configuration. By default, these values
    server:
        redis:
            host: 127.0.0.1
            port: 6379
            database: ~
```

Jobs and Queues
---------------

[](#jobs-and-queues)

Each queue you define in config.yml will create a queue service, for example if you define queue 'queue:api' you can access to queue like a service with `$this->getContainer()->get('queue_system.queue_api')`, example:

`Producer`

```
...
use BernardoSecades\QueueSystemBundle\Job\MessageDataJob;
...

/** @var \BernardoSecades\QueueSystemBundle\Queue\Queue $queue */
$queue = $this->getContainer()->get('queue_system.queue_api');

$message = new MessageDataJob('queue_system.api_job', ['user_id' => 13567]);

$queue->enqueue($message);
```

In this example you should create a service API job extending of `BernardoSecades\QueueSystemBundle\Job\JobAbstract`, where you will need implement the method `handle()` and `getDicName()`, the first parameter of object `MessageDataJob` is the service name of your custom job.

```
class ApiJob extends JobAbstract
{
    /**
     * Name service in your dependency injection container
     *
     * {@inheritdoc}
     */
    public function getDicName()
    {
        return 'queue_system.api_job';
    }

    /**
     * {@inheritdoc}
     */
    public function handle()
    {
        $arguments = $this->getArguments();
        syslog(0, sprintf('Executing method handle with argument user_id: %d', $arguments['user_id']));
        ...
        // do more things
    }
}
```

Worker
------

[](#worker)

This bundle include a worker command to consume jobs from queue saved in redis.

Example to consume jobs from queue `queue:api` you should execute the next command:

`./app/console queue-system:worker queue:api`

The command have options like:

- --worker-max-jobs=WORKER-MAX-JOBS Number of jobs to process \[default: 0\]
- --worker-tries-process-job=WORKER-TRIES-PROCESS-JOB Number of retries to process a job \[default: 0\]
- --worker-max-memory=WORKER-MAX-MEMORY Memory limit (Mb) \[default: 0\]
- --worker-sleep=WORKER-SLEEP In addition, you may specify the number of seconds to wait before polling for new jobs: \[default: 0\]

Todo
----

[](#todo)

- More tests
- Include event distpatcher.
- Include log system in worker command.
- Custom serializer.
- Fix code style to have compatibility with symfony style.
- Include external services to check quality code and fix possible issues.
- Improve the documentation and include example how set up worker in supervisord.

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

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://avatars.githubusercontent.com/u/1932461?v=4)[Bernardo Secades](/maintainers/bernardosecades)[@bernardosecades](https://github.com/bernardosecades)

---

Top Contributors

[![bernardosecades](https://avatars.githubusercontent.com/u/1932461?v=4)](https://github.com/bernardosecades "bernardosecades (7 commits)")

### Embed Badge

![Health badge](/badges/bernardosecades-queue-system-bundle/health.svg)

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

###  Alternatives

[league/geotools

Geo-related tools PHP 7.3+ library

1.4k5.5M30](/packages/league-geotools)[illuminate/bus

The Illuminate Bus package.

6045.5M508](/packages/illuminate-bus)[uecode/qpush-bundle

Asynchronous processing for Symfony using Push Queues

1672.5M2](/packages/uecode-qpush-bundle)[jayazhao/think-queue-rabbitmq

为 ThinkPHP5.1 队列增加 RabbitMQ 驱动

141.5k](/packages/jayazhao-think-queue-rabbitmq)[mayconbordin/l5-stomp-queue

Stomp Queue Driver for Laravel 5

121.1k](/packages/mayconbordin-l5-stomp-queue)

PHPackages © 2026

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