PHPackages                             rnd-cosoft/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. [Queues &amp; Workers](/categories/queues)
4. /
5. rnd-cosoft/queue

ActiveLibrary[Queues &amp; Workers](/categories/queues)

rnd-cosoft/queue
================

Laminas module that integrates with various queue management systems

3.2.1(2y ago)08BSD-3-ClausePHPPHP ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0

Since Feb 4Pushed 2y agoCompare

[ Source](https://github.com/rnd-cosoft/SlmQueue)[ Packagist](https://packagist.org/packages/rnd-cosoft/queue)[ Docs](https://github.com/Webador/SlmQueue)[ RSS](/packages/rnd-cosoft-queue/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (13)Versions (47)Used By (0)

SlmQueue
========

[](#slmqueue)

[![Latest Stable Version](https://camo.githubusercontent.com/e69e1f3a4416154e86c414a32dddc37eecdd614eb77adebb51c94f81d0071b37/68747470733a2f2f706f7365722e707567782e6f72672f736c6d2f71756575652f762f737461626c652e706e67)](https://packagist.org/packages/slm/queue)

SlmQueue is a job queue abstraction layer for Laminas (formerly Zend Framework) and Mezzio (formerly Zend Expressive) applications. It supports various job queue systems and makes your application independent from the underlying system you use. The currently supported systems have each their own adapter library:

- [Doctrine ORM](https://github.com/Webador/SlmQueueDoctrine)
- [RabbitMQ](https://github.com/rnd-cosoft/slm-queue-rabbitmq)
- [Amazon SQS](https://github.com/Webador/SlmQueueSqs) (outdated, [maintainers wanted](https://github.com/Webador/SlmQueueSqs/issues/58))

When to use
-----------

[](#when-to-use)

A job queue helps to offload long or memory-intensive processes from the HTTP requests clients sent to the Laminas application. This will make your response times shorter and your visitors happier. There are many use cases for asynchronous jobs and a few examples are:

1. Send an email
2. Create a PDF file
3. Connect to a third party server over HTTP

In all cases you want to serve the response as soon as possible to your visitor, without letting them wait for this long process. SlmQueue enables you to implement a job queue system very easily within your existing application.

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

[](#installation)

SlmQueue works with [Composer](http://getcomposer.org). Make sure you have the composer.phar downloaded and you have a `composer.json` file at the root of your project. To install it, add the following line into your `composer.json` file:

```
"require": {
    "slm/queue": "^3.0"
}
```

After installation of the package, you need to complete the following steps to use SlmQueue:

1. Enable the module by adding `SlmQueue` in your `application.config.php` file.
2. Copy the `slm_queue.global.php.dist` (you can find this file in the `config` folder of SlmQueue) into your `config/autoload` folder and apply any setting you want.

NB. SlmQueue is a skeleton and therefore useless by itself. Enable an adapter to give you the implementation details you need to push jobs into the queue. Install one of the available adapters ([SlmQueueDoctrine](https://github.com/Webador/SlmQueueDoctrine), [SlmQueueRabbitMq](https://github.com/rnd-cosoft/slm-queue-rabbitmq), or [SlmQueueSqs](https://github.com/Webador/SlmQueueSqs)).

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

[](#requirements)

- PHP &gt;= 7.4
- [laminas-servicemanager &gt;= 3.3.1](https://github.com/laminas/laminas-servicemanager)

Code samples
------------

[](#code-samples)

Below are a few snippets which show the power of SlmQueue in your application. The full documentation is available in [docs/](/docs) directory.

A sample job to send an email with php's `mail()` might look like this:

```
namespace MyModule\Job;

use SlmQueue\Job\AbstractJob;

class EmailJob extends AbstractJob
{
    public static function create(string $to, string $subject, string $message): self
    {
        // This will bypass the constructor, and thus load a job without
        // having to load the dependencies.
        $job = self::createEmptyJob([
            'subject' => $subject,
            'to' => $to,
            'message' => $message,
        ]);

        // Add some metadata, so we see what is going on.
        $job->setMetadata('to', $to);

        return $job;
    }

    private SomeMailService $mailService;

    public function __construct(SomeMailService $mailService)
    {
        $this->mailService = $mailService;
    }

    public function execute()
    {
        $payload = $this->getContent();

        $to      = $payload['to'];
        $subject = $payload['subject'];
        $message = $payload['message'];

        $this->mailService->send($to, $subject, $message);
    }
}
```

If you want to inject this job into a queue, you can do this for instance in your controller:

```
namespace MyModule\Controller;

use MyModule\Job\Email as EmailJob;
use SlmQueue\Queue\QueueInterface;
use Laminas\Mvc\Controller\AbstractActionController;

class MyController extends AbstractActionController
{
    protected $queue;

    public function __construct(QueueInterface $queue)
    {
        $this->queue = $queue;
    }

    public function fooAction()
    {
        // Do some work

        $this->queue->push(
            EmailJob::create('john@doe.com', 'Just hi', 'Hi, I want to say hi!'),
            ['delay' => 60]
        );
    }
}
```

Now the above code lets you insert jobs in a queue, but then you need to spin up a worker which can process these jobs.

SlmQueue integrates with [`laminas-cli`](https://github.com/laminas/laminas-servicemanager) for command line usage. You can start up a worker for queue "default" with the following command:

```
$ vendor/bin/laminas slm-queue:start default
```

Contributing
------------

[](#contributing)

SlmQueue is developed by various fanatic Laminas users. The code is written to be as generic as possible for Laminas applications. If you want to contribute to SlmQueue, fork this repository and start hacking!

Any bugs can be reported as an [issue](https://github.com/Webador/SlmQueue/issues) at GitHub. If you want to contribute, please be aware of the following guidelines:

1. Fork the project to your own repository
2. Use branches to work on your own part
3. Create a Pull Request at the canonical SlmQueue repository
4. Make sure to cover changes with the right amount of unit tests
5. If you add a new feature, please work on some documentation as well

For long-term contributors, push access to this repository is granted.

Who to thank?
-------------

[](#who-to-thank)

[Jurian Sluiman](https://github.com/juriansluiman) and [Michaël Gallego](https://github.com/bakura10) did the initial work on creating this repo, and maintained it for a long time.

Currently it is maintained by:

- [Bas Kamer](https://github.com/basz)
- [Roel van Duijnhoven](https://github.com/roelvanduijnhoven)

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity91

Battle-tested with a long release history

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~99 days

Recently: every ~181 days

Total

42

Last Release

771d ago

Major Versions

0.8.0 → 1.0.02017-03-21

1.0.4 → 2.0.02020-01-30

2.1.0 → 3.0-beta2021-07-09

PHP version history (10 changes)0.1PHP &gt;=5.3.3.

0.2PHP &gt;=5.3.3

0.5.0PHP &gt;=5.5

2.0.0PHP ^7.2

3.0-betaPHP ^7.2 || ^8.0

3.0-beta.3PHP ^7.3 || ^8.0

3.0.0PHP ^7.4 || ~8.0

3.1.0PHP ~7.4.0 || ~8.0.0 || ~8.1.0

3.2.0PHP ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0

3.2.1PHP ~7.4.0 || ~8.0.0 || ~8.1.0 || ~8.2.0 || ~8.3.0

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1388877?v=4)[Kristijonas Lučinskas](/maintainers/kristijonas)[@Kristijonas](https://github.com/Kristijonas)

---

Top Contributors

[![bakura10](https://avatars.githubusercontent.com/u/1198915?v=4)](https://github.com/bakura10 "bakura10 (210 commits)")[![basz](https://avatars.githubusercontent.com/u/143068?v=4)](https://github.com/basz "basz (180 commits)")[![roelvanduijnhoven](https://avatars.githubusercontent.com/u/91910?v=4)](https://github.com/roelvanduijnhoven "roelvanduijnhoven (37 commits)")[![koenkivits](https://avatars.githubusercontent.com/u/1873829?v=4)](https://github.com/koenkivits "koenkivits (29 commits)")[![malinink](https://avatars.githubusercontent.com/u/5726553?v=4)](https://github.com/malinink "malinink (18 commits)")[![eddiejaoude](https://avatars.githubusercontent.com/u/624760?v=4)](https://github.com/eddiejaoude "eddiejaoude (15 commits)")[![garygitton](https://avatars.githubusercontent.com/u/3704874?v=4)](https://github.com/garygitton "garygitton (10 commits)")[![kokx](https://avatars.githubusercontent.com/u/138556?v=4)](https://github.com/kokx "kokx (6 commits)")[![MatthiasKuehneEllerhold](https://avatars.githubusercontent.com/u/19988979?v=4)](https://github.com/MatthiasKuehneEllerhold "MatthiasKuehneEllerhold (6 commits)")[![BnitoBzh](https://avatars.githubusercontent.com/u/2962152?v=4)](https://github.com/BnitoBzh "BnitoBzh (6 commits)")[![imonteiro](https://avatars.githubusercontent.com/u/3138089?v=4)](https://github.com/imonteiro "imonteiro (5 commits)")[![eivydas](https://avatars.githubusercontent.com/u/23526632?v=4)](https://github.com/eivydas "eivydas (3 commits)")[![dronchik](https://avatars.githubusercontent.com/u/1178466?v=4)](https://github.com/dronchik "dronchik (2 commits)")[![dkmuir](https://avatars.githubusercontent.com/u/771586?v=4)](https://github.com/dkmuir "dkmuir (2 commits)")[![rnd-cosoft](https://avatars.githubusercontent.com/u/57006314?v=4)](https://github.com/rnd-cosoft "rnd-cosoft (2 commits)")[![settermjd](https://avatars.githubusercontent.com/u/196801?v=4)](https://github.com/settermjd "settermjd (2 commits)")[![TomHAnderson](https://avatars.githubusercontent.com/u/493920?v=4)](https://github.com/TomHAnderson "TomHAnderson (1 commits)")[![Fgruntjes](https://avatars.githubusercontent.com/u/984466?v=4)](https://github.com/Fgruntjes "Fgruntjes (1 commits)")[![FrankHouweling](https://avatars.githubusercontent.com/u/1426973?v=4)](https://github.com/FrankHouweling "FrankHouweling (1 commits)")[![gregtyler](https://avatars.githubusercontent.com/u/100852?v=4)](https://github.com/gregtyler "gregtyler (1 commits)")

---

Tags

laminasqueuejobmezzio

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/rnd-cosoft-queue/health.svg)

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

###  Alternatives

[laminas/laminas-cache

Caching implementation with a variety of storage options, as well as codified caching strategies for callbacks, classes, and output

1076.9M130](/packages/laminas-laminas-cache)[imtigger/laravel-job-status

Laravel Job Status

5272.1M3](/packages/imtigger-laravel-job-status)[jms/job-queue-bundle

Allows to run and schedule Symfony console commands as background jobs.

3462.3M5](/packages/jms-job-queue-bundle)[clue/mq-react

Mini Queue, the lightweight in-memory message queue to concurrently do many (but not too many) things at once, built on top of ReactPHP

144691.7k4](/packages/clue-mq-react)[mpbarlow/laravel-queue-debouncer

A wrapper job for debouncing other queue jobs.

63714.4k1](/packages/mpbarlow-laravel-queue-debouncer)[mariano/disque-php

PHP library for Disque, an in-memory, distributed job queue

134118.5k2](/packages/mariano-disque-php)

PHPackages © 2026

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