Download the PHP package slm/queue-amq without Composer

On this page you can find all versions of the php package slm/queue-amq. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package queue-amq

SlmQueueAmq

Build Status PHP 7 ready Code Coverage Latest Stable Version Latest Unstable Version Scrutinizer Code Quality Dependency Status

Created by Jurian Sluiman

Requirements

Installation

First, install SlmQueue (instructions here). Then, add the following line into your composer.json file:

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

Before reading SlmQueueAmq documentation, please read SlmQueue documentation.

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

Setting the connection parameters

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

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:

This queue can therefore be pulled from the QueuePluginManager class.

Operations on queues

push

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

Example:

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.

pop

Valid option is:

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 <queue> [--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).


All versions of queue-amq with dependencies

PHP Build Version
Package Version
Requires php Version >=5.4.0
zendframework/zend-mvc Version ~2.2
zendframework/zend-servicemanager Version ~2.2
zendframework/zend-stdlib Version ~2.2
slm/queue Version 0.4.*
fusesource/stomp-php Version ~2.1
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package slm/queue-amq contains the following files

Loading the files please wait ....