A Stomp Protocol Queue adapter for Zend_Queue, more unit-tests, 'no-local' header, php 5.3 based
PHP
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib/OpenSky/Queue
test
vendor
README.md
autoload.php

README.md

Usage

Pretty standard:

$queueAdapter = new \OpenSky\Queue\Stomp(array(
    'host'        => 'localhost',
    'scheme'    => 'tcp',
    'port'        => 61613,
    'username'    => 'system', //optional
    'password'    => 'manager', //optional
));

$queue = new \Zend_Queue($queueAdapter, array(
    'name' => '/queue/some_queue'
));

$queue->send('someMessageString');

$messagesToReceiveCount = 1;
$messages = $queue->receive($messagesToReceiveCount);
$this->assertEquals(1, count($messages);

$message = $messages->current();
$this->assertEquals('someMessageString', $message->body);