Implements concrete Queue for the doctrine work queue. Requires the packages flowpack/jobqueue-common to be installed.

Installs: 45 985

Dependents: 3

Suggesters: 0

Security: 0

Stars: 5

Watchers: 2

Forks: 7

Open Issues: 1


3.0.4 2020-02-26 17:37 UTC

This package is auto-updated.

Last update: 2020-09-26 19:08:25 UTC


A job queue backend for the Flowpack.JobQueue.Common package based on Doctrine.


Install the package using composer:

composer require flowpack/jobqueue-doctrine

If not already installed, that will fetch its requirements, namely the jobqueue-common package.

Now the queue can be configured like this:

          className: 'Flowpack\JobQueue\Doctrine\Queue\DoctrineQueue'
          executeIsolated: true
            defaultTimeout: 50
            priority: 512
            delay: 120

The required tables can be created executing:

./flow queue:setup some-queue

Specific options

The DoctrineQueue supports following options:

Option Type Default Description
defaultTimeout integer 60 Number of seconds new messages are waited for before a timeout occurs (This is overridden by a "timeout" argument in the waitAndTake() and waitAndReserve() methods
pollInterval integer 1 Number of seconds between SQL lookups for new messages
tableName string flowpack_jobqueue_messages_ Name of the database table for this queue. By default this is the queue name prefixed with "flowpack_jobqueue_messages_"
backendOptions array - Doctrine-specific connection params (see Doctrine reference)

NOTE: The DoctrineQueue currently supports MySQL, PostgreSQL and SQLite backends. You can specify the backend via the backendOptions. If you omit this setting, the current connection will be re-used (i.e. the currently active Flow database).

Submit options

Additional options supported by JobManager::queue(), DoctrineQueue::submit() and the Job\Defer annotation:

Option Type Default Description
delay integer 0 Number of seconds before a message is marked "ready" after submission. This can be useful to prevent premature execution of jobs (i.e. before entities are persisted)

Release options

Additional options to be specified via releaseOptions:

Option Type Default Description
delay integer 0 Number of seconds before a message is marked "ready" after it has been released.


This package is licensed under the MIT license


Pull-Requests are more than welcome. Make sure to read the Code Of Conduct.