PHPackages                             docplanner/tasks-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. docplanner/tasks-bundle

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

docplanner/tasks-bundle
=======================

Tasks bundle based on RabbitMQ

v1.0.0(9y ago)04841[1 PRs](https://github.com/DocPlanner/TasksBundle/pulls)MITPHP

Since Jan 27Pushed 8y ago6 watchersCompare

[ Source](https://github.com/DocPlanner/TasksBundle)[ Packagist](https://packagist.org/packages/docplanner/tasks-bundle)[ RSS](/packages/docplanner-tasks-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

TasksBundle
===========

[](#tasksbundle)

Requirements
------------

[](#requirements)

#### RabbitMQ

[](#rabbitmq)

`rabbitmq_delayed_message_exchange` plugin enabled

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

[](#installation)

#### Composer

[](#composer)

```
composer require docplanner/tasks-bundle

```

#### Add to AppKernel

[](#add-to-appkernel)

```
	new \OldSound\RabbitMqBundle\OldSoundRabbitMqBundle,
	new DocPlanner\TasksBundle\DocPlannerTasksBundle,
```

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

[](#configuration)

### Define connection in `OldSoundRabbitMqBundle` configuration

[](#define-connection-in-oldsoundrabbitmqbundle-configuration)

```
old_sound_rabbit_mq:
    connections:
        default:
            host:     "%rabbit.host%"
            port:     "%rabbit.port%"
            user:     "%rabbit.user%"
            password: "%rabbit.password%"
            vhost:    "%rabbit.vhost%"
            lazy:     false
            connection_timeout: 3
            read_write_timeout: 3
            keepalive: false
            heartbeat: 0
```

### Define tasks configuration

[](#define-tasks-configuration)

```
docplanner_tasks:
    connection_name: default
    names_prefix: asd_
```

Define task
-----------

[](#define-task)

### Define task payload

[](#define-task-payload)

You have to extend class `DocPlanner\TasksBundle\Tasks\BaseTaskPayload`, whole object will be serialized using `serialize` function.

### Define job

[](#define-job)

You have to extend class `DocPlanner\TasksBundle\Tasks\BaseTask`, method `execute` contains job body, method `supports` check that given payload is supported by task. You have to tag your task service with tag `docplanner_tasks.task`

#### WARNING

[](#warning)

If method `execute` will return `true` it means task was executed successfully, `false` will cause requeuing for given task. Requeue number is limited by number defined on task class. If payload requeue number will exceed requeue limit, task will be moved to bury queue.

### Examples

[](#examples)

```
class SamplePayload extends BaseTaskPayload
{
	protected $someValue;

	public function __construct(string $someValue)
	{
		$this->someValue = $someValue;
	}

	public function getSomeValue() : string
	{
		return $this->someValue;
	}
}
```

```
class SampleTask extends BaseTask
{
	/**
	 * @var SamplePayload $payload
	 */
	protected function execute(BaseTaskPayload $payload): bool
	{
		file_put_contents('/tmp/payload.log', var_export($payload, true) . PHP_EOL . $payload->getSomeValue());

		return true;
	}

	public function supports(BaseTaskPayload $payload): bool
	{
		return $payload instanceof SamplePayload;
	}
}
```

```
  sample_task:
    class: Your\Namespace\SampleTask
    tags:
      - { name: docplanner_tasks.task }
```

Produce tasks
-------------

[](#produce-tasks)

### Without delay

[](#without-delay)

```
	$taskProducer = $container->get('docplanner_tasks.task_producer');

	$taskProducer->enqueue(new SamplePayload());
```

### With delay

[](#with-delay)

```
	$taskProducer = $container->get('docplanner_tasks.task_producer');

	$dateTime = new \DateTime('now + 2 minutes');

	$taskProducer->enqueue(new SamplePayload(), $dateTime);
```

Consume tasks
-------------

[](#consume-tasks)

```
bin/console docplanner:tasks:run

```

check `--help` for more info

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3389d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/10ae2527ad43745ea12faa6b628461b5eadd38cc4135d7eb534f29a374f9759e?d=identicon)[lukasz.barulski](/maintainers/lukasz.barulski)

---

Top Contributors

[![lbarulski](https://avatars.githubusercontent.com/u/2803144?v=4)](https://github.com/lbarulski "lbarulski (2 commits)")

---

Tags

asyncbundledelayjobsrabbitmqsymfonytasksjobrabbitmqtaskjobsTasksrabbitasynchronous jobasynchronous jobs

### Embed Badge

![Health badge](/badges/docplanner-tasks-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/docplanner-tasks-bundle/health.svg)](https://phpackages.com/packages/docplanner-tasks-bundle)
```

###  Alternatives

[bunny/bunny

Performant pure-PHP AMQP (RabbitMQ) non-blocking ReactPHP library

7426.5M37](/packages/bunny-bunny)[qruto/laravel-flora

Install and update Laravel application with single command

13197.8k](/packages/qruto-laravel-flora)[prolic/humus-amqp

PHP-AMQP library with RabbitMQ Extensions

76205.4k5](/packages/prolic-humus-amqp)[contributte/rabbitmq

Nette extension for RabbitMQ (using BunnyPHP)

251.6M](/packages/contributte-rabbitmq)[iron-io/iron_worker

Client library for IronWorker (multi-language worker platform that runs tasks in the background, in parallel, and at scale.)

57208.5k1](/packages/iron-io-iron-worker)[kdyby/rabbitmq

Integrates php-amqplib with RabbitMq and Nette Framework

30693.1k4](/packages/kdyby-rabbitmq)

PHPackages © 2026

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