Example usage
The below example of Zend_Queue shows a variety of
features, including queue creation, queue retrieval, message retrieval,
message deletion, and sending messages.
// For configuration options
// @see Zend_Queue_Adapater::__construct()
'name' => 'queue1',
);
// Create an array queue
'Array', $options);
// Get list of queues
"\n";
}
// Create a new queue
$queue2 = $queue->createQueue('queue2');
// Get number of messages in a queue (supports Countable interface from SPL)
// Get up to 5 messages from a queue
"\n";
// We have processed the message; now we remove it from the queue.
$queue->deleteMessage($message);
}
// Send a message to the currently active queue
'My Test Message');
// Delete a queue we created and all of it's messages
$queue->deleteQueue('queue2');