PHPackages                             slm/queue-amq - 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. slm/queue-amq

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

slm/queue-amq
=============

Zend Framework 2 module that integrates with Active MQ queuing system

v0.1.0(10y ago)33.4k2BSD-3-ClausePHPPHP &gt;=5.4.0

Since May 28Pushed 6y ago3 watchersCompare

[ Source](https://github.com/JouwWeb/SlmQueueAmq)[ Packagist](https://packagist.org/packages/slm/queue-amq)[ Docs](https://github.com/juriansluiman/SlmQueueAmq)[ RSS](/packages/slm-queue-amq/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (8)Versions (3)Used By (0)

SlmQueueAmq
===========

[](#slmqueueamq)

[![Build Status](https://camo.githubusercontent.com/7a67d17c9e6f44f3fda924add0c92973a5e4df0602a6ce24a5b1f5ad3f4e2718/68747470733a2f2f7472617669732d63692e6f72672f6a757269616e736c75696d616e2f536c6d5175657565416d712e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/juriansluiman/SlmQueueAmq)[![PHP 7 ready](https://camo.githubusercontent.com/f162651831e852002ff54463da7384c499bf3514f948395612d1a48bee865b27/687474703a2f2f7068703772656164792e74696d6573706c696e7465722e63682f6a757269616e736c75696d616e2f536c6d5175657565416d712f62616467652e737667)](https://travis-ci.org/juriansluiman/SlmQueueAmq)[![Code Coverage](https://camo.githubusercontent.com/0f0388c79aaa16f091c6c7062590124f3b3e1814fd62d52b49d58a2cc37d08d9/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6a757269616e736c75696d616e2f536c6d5175657565416d712f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/juriansluiman/SlmQueueAmq/?branch=master)[![Latest Stable Version](https://camo.githubusercontent.com/87174a1c5b7283f5deba6e0963e35dba23e922851cbce80a26cbae492ebb0eba/68747470733a2f2f706f7365722e707567782e6f72672f736c6d2f71756575652d616d712f762f737461626c65)](https://packagist.org/packages/slm/queue-amq)[![Latest Unstable Version](https://camo.githubusercontent.com/cbb205ad07e3b7031773cb614a9067401b710c4791861af9d66a3255101a37e1/68747470733a2f2f706f7365722e707567782e6f72672f736c6d2f71756575652d616d712f762f756e737461626c65)](https://packagist.org/packages/slm/queue-amq)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/4393b45cb810542683aca36ab9874e111bbcb5cae636dfdcbf0b591d7df128f9/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6a757269616e736c75696d616e2f536c6d5175657565416d712f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/juriansluiman/SlmQueueAmq/?branch=master)[![Dependency Status](https://camo.githubusercontent.com/8447b31a88a08a7c678bf01250214715ac2b446a38231b7f61b6c1d31804b543/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f757365722f70726f6a656374732f3535343164643265366638333434343136323030303230382f62616467652e7376673f7374796c653d666c6174)](https://www.versioneye.com/user/projects/5541dd2e6f83444162000208)

Created by Jurian Sluiman

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

[](#requirements)

- [Zend Framework 2](https://github.com/zendframework/zf2)
- [SlmQueue](https://github.com/juriansluiman/SlmQueue)
- [stomp-php](https://github.com/dejanb/stomp-php)

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

[](#installation)

First, install SlmQueue ([instructions here](https://github.com/juriansluiman/SlmQueue/blob/master/README.md)). Then, add the following line into your `composer.json` file:

```
"require": {
    "slm/queue-amq": "0.4.*"
}
```

Then, enable the module by adding `SlmQueueAmq` in your application.config.php file. You may also want to configure the module: just copy the `slm_queue_amq.local.php.dist` (you can find this file in the config folder of SlmQueueAmq) into your config/autoload folder, and override what you want.

Documentation
-------------

[](#documentation)

Before reading SlmQueueAmq documentation, please read [SlmQueue documentation](https://github.com/juriansluiman/SlmQueue).

(Don't forget to first install Active MQ, and to run the daemon program on the server)

### Setting the connection parameters

[](#setting-the-connection-parameters)

Copy the `slm_queue_amq.local.php.dist` file to your `config/autoload` folder, and follow the instructions.

### Adding queues

[](#adding-queues)

A concrete class that implements the SlmQueue interface for Active MQ is included as `SlmQueueAmq\Queue\AmqQueue` and a factory is available to create the queue. Therefore, if you want to have a queue called "email", just add the following line in your `module.config.php` file:

```
return array(
    'slm_queue' => array(
        'queue_manager' => array(
            'factories' => array(
                'email' => 'SlmQueueAmq\Factory\AmqQueueFactory'
            )
        )
    )
);
```

This queue can therefore be pulled from the QueuePluginManager class.

### Operations on queues

[](#operations-on-queues)

#### push

[](#push)

Valid options are all constants on the `SlmQueueAmq\Queue\AmqQueueInterface` interface:

- `AmqQueueInterface::DELAY`: the delay in milliseconds before a job become available to be popped (defaults to no delay)
- `AmqQueueInterface::PERIOD`: in milliseconds, how much time a job can be running for before it's put back into the queue
- `AmqQueueInterface::REPEAT`: the number of times the job should be repeatedly available (defaults to 1, no repeating jobs)
- `AmqQueueInterface::CRON`: a CRON string to schedule the job via cron
- `AmqQueueInterface::PERSIST`: set to true to send a persistent message

Example:

```
use SlmQueueAmq\Queue\AmqQueueInterface as Amq;

$queue->push($job, array(
    Amq::CRON     => '0 * * * *',
    Amq::DELAY    => 1000,
    Amq::PERIOD   => 1000,
    Amq::REPEAT   => 9
));
```

The above code will deliver the job 10 times, with a one second delay between each job, and this will happen every hour. See more explaination about the options in the [Active MQ manual](http://activemq.apache.org/nms/stomp-delayed-and-scheduled-message-feature.html).

#### pop

[](#pop)

Valid option is:

- timeout: by default, when we ask for a job, it will block until a job is found (possibly forever if new jobs never come). If you set a timeout (in seconds), it will return after the timeout is expired, even if no jobs were found

### Executing jobs

[](#executing-jobs)

SlmQueueAmq provides a command-line tool that can be used to pop and execute jobs. You can type the following command within the public folder of your Zend Framework 2 application:

`php index.php queue amq  [--timeout=]`

The queue is a mandatory parameter, while the timeout is an optional flag that specifies the duration in seconds for which the call will wait for a job to arrive in the queue before returning (because the script can wait forever if no job come).

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

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

4005d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ca21233cea84cc055bcc3678608a64bcf30b3da970a5fab96f54590ae3506125?d=identicon)[roelvanduijnhoven](/maintainers/roelvanduijnhoven)

![](https://www.gravatar.com/avatar/01a3e1034b26bd108985705a0e5292850bf1ee7d234d4676c8735d6feeebf85f?d=identicon)[koenkivits](/maintainers/koenkivits)

---

Tags

queuejobzf2stompactiveMQamqactive-mq

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/slm-queue-amq/health.svg)

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

###  Alternatives

[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)[stomp-php/stomp-php

stomp support for PHP

1285.6M26](/packages/stomp-php-stomp-php)[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)
