2017 © Pedro Peláez
 

library queue-adapters

Module that wraps the zend-queue library allowing access via the service manager

image

jdornbusch/queue-adapters

Module that wraps the zend-queue library allowing access via the service manager

  • Saturday, April 26, 2014
  • by joachimdo
  • Repository
  • 1 Watchers
  • 0 Stars
  • 23 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

zf2-queueing-factory-module

This module only provides factories to give access to the queueing functionalities via Zend Service Manager. For now, it is limited to Activemq., (*1)

Installation

Just add QueueAdapters to the listed module names, rename and copy the module.queue-adapters.local.php.dist to your application config autoload directory and fill it, e.g. :, (*2)

return array (
        "queue-adapters" => array(
                //inform the controller plugin, 
                // "default" =>"activemq",
                "activemq" => array (
                        //"host" => "127.0.0.1",
                        //"port" => "61613",
                        // "scheme" => "tcp",

                )
        )

);

Usage

An instance of ZendQueue\Queue with the ActivMQ adapter is now available :, (*3)

  • either as a service
$service = $this->getServiceLocator()->get("activemq");
//write to queue
$service->createQueue("test");
$service->send("Hello World n°1");
//read from queue
$iterator=$service->receive();
$current=$iterator->current();
  • or as a plugin manager if you want to access it from a Controller
//write to queue
$this->queue()->createQueue("test");
$this->queue()->send("Hello World n°1");
//read from queue
$iterator=$this->queue()->receive();
$current=$iterator->current();

The Versions

26/04 2014

dev-master

9999999-dev

Module that wraps the zend-queue library allowing access via the service manager

  Sources   Download

GPL-3.0+

The Requires

 

by Avatar joachimdo