WindowsAzure adapter for simple queue service.

Provides functionality around setting message and message set classes.

category Zend
package Zend_Cloud
subpackage QueueService
copyright Copyright (c) 2005-2015 Zend Technologies USA Inc. (http://www.zend.com)
license New BSD License
inherited_from \Zend_Cloud_QueueService_Adapter_AbstractAdapter

 Methods

Constructor

__construct(array|\Zend_Config $options = array()) : void

Parameters

$options

array\Zend_Config

Create a queue. Returns the ID of the created queue (typically the URL).

createQueue(string $name, array $options = null) : string

It may take some time to create the queue. Check your vendor's documentation for details.

Parameters

$name

string

$options

array

Returns

stringQueue ID (typically URL)

Delete the specified message from the specified queue.

deleteMessage(string $queueId, \Zend_Cloud_QueueService_Message $message, array $options = null) : void

Parameters

$queueId

string

$message

\Zend_Cloud_QueueService_Message

Message ID or message

$options

array

Delete a queue. All messages in the queue will also be deleted.

deleteQueue(string $queueId, array $options = null) : boolean

Parameters

$queueId

string

$options

array

Returns

booleantrue if successful, false otherwise

Get Azure implementation

getClient() : \Zend_Service_Azure_Storage_Queue

Returns

\Zend_Service_Azure_Storage_Queue

Get class to use for message objects

getMessageClass() : string
Inherited

Returns

string

Get class to use for message collection objects

getMessageSetClass() : string
Inherited

Returns

string

List all queues.

listQueues(array $options = null) : array

Parameters

$options

array

Returns

arrayQueue IDs

Peek at the messages from the specified queue without removing them.

peekMessages(string $queueId, integer $num = 1, array $options = null) : array<mixed,\Zend_Cloud_QueueService_Message>

Parameters

$queueId

string

$num

integer

How many messages

$options

array

Returns

array<mixed,\Zend_Cloud_QueueService_Message>

Recieve at most $max messages from the specified queue and return the message IDs for messages recieved.

receiveMessages(string $queueId, integer $max = 1, array $options = null) : array<mixed,\Zend_Cloud_QueueService_Message>

Parameters

$queueId

string

$max

integer

$options

array

Returns

array<mixed,\Zend_Cloud_QueueService_Message>

Send a message to the specified queue.

sendMessage(string $queueId, string $message, array $options = null) : string

Parameters

$queueId

string

$message

string

$options

array

Returns

stringMessage ID

Set class to use for message objects

setMessageClass(string $class) : \Zend_Cloud_QueueService_Adapter_AbstractAdapter
Inherited

Parameters

$class

string

Returns

\Zend_Cloud_QueueService_Adapter_AbstractAdapter

Set class to use for message collection objects

setMessageSetClass(string $class) : \Zend_Cloud_QueueService_Adapter_AbstractAdapter
Inherited

Parameters

$class

string

Returns

\Zend_Cloud_QueueService_Adapter_AbstractAdapter

Create Zend_Cloud_QueueService_Message array for Azure messages.

_makeMessages(array $messages) : array<mixed,\Zend_Cloud_QueueService_Message>

Parameters

$messages

array

Returns

array<mixed,\Zend_Cloud_QueueService_Message>

 Properties

 

Class to use for queue messages

$_messageClass : string

Default

'Zend_Cloud_QueueService_Message'
 

Class to use for collections of queue messages

$_messageSetClass : string

Default

'Zend_Cloud_QueueService_MessageSet'
 

Storage client

$_storageClient : \Zend_Service_WindowsAzure_Storage_Queue

Default

null

 Constants

     

DEFAULT_HOST

DEFAULT_HOST = \Zend_Service_WindowsAzure_Storage::URL_CLOUD_QUEUE 
 

HOST

HOST = "storage_host" 
 

LIST_MAX_RESULTS

LIST_MAX_RESULTS = 'max_results' 
 

list options

LIST_PREFIX = 'prefix' 
 

MESSAGESET_CLASS

MESSAGESET_CLASS = 'messageset_class' 
 

MESSAGE_CLASS

MESSAGE_CLASS = 'message_class' 
 

message options

MESSAGE_TTL = 'ttl' 
 

PROXY_CREDENTIALS

PROXY_CREDENTIALS = "storage_proxy_credentials" 
 

PROXY_HOST

PROXY_HOST = "storage_proxy_host" 
 

PROXY_PORT

PROXY_PORT = "storage_proxy_port"