LICENSE
This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.
Abstract queue adapter
Provides functionality around setting message and message set classes.

string
$_messageClass= 'Zend_Cloud_QueueService_Message'
Zend_Cloud_QueueService_Message
Details
createQueue(
string $name, array $options
=
null
)
:
string
Create a queue. Returns the ID of the created queue (typically the URL).
Inherited from: \Zend_Cloud_QueueService_Adapter::createQueue()It may take some time to create the queue. Check your vendor's documentation for details.
Name constraints: Maximum 80 characters Only alphanumeric characters, hyphens (-), and underscores (_)
Name | Type | Description |
---|---|---|
$name | string | |
$options | array |
Type | Description |
---|---|
string | Queue ID (typically URL) |

deleteMessage(
string $queueId, \Zend_Cloud_QueueService_Message $message, array $options
=
null
)
:
void
Delete the specified message from the specified queue.
Inherited from: \Zend_Cloud_QueueService_Adapter::deleteMessage()Name | Type | Description |
---|---|---|
$queueId | string | |
$message | \Zend_Cloud_QueueService_Message | Message to delete |
$options | array |

deleteQueue(
string $queueId, array $options
=
null
)
:
boolean
Delete a queue. All messages in the queue will also be deleted.
Inherited from: \Zend_Cloud_QueueService_Adapter::deleteQueue()Name | Type | Description |
---|---|---|
$queueId | string | |
$options | array |
Type | Description |
---|---|
boolean | true if successful, false otherwise |

fetchQueueMetadata(
string $queueId, array $options
=
null
)
:
array
Get a key/value array of metadata for the given queue.
Inherited from: \Zend_Cloud_QueueService_Adapter::fetchQueueMetadata()Name | Type | Description |
---|---|---|
$queueId | string | |
$options | array |
Type | Description |
---|---|
array |

getClient(
)
:
void
Get the concrete adapter.
Inherited from: \Zend_Cloud_QueueService_Adapter::getClient()
getMessageSetClass(
)
:
string
Get class to use for message collection objects
Type | Description |
---|---|
string |

listQueues(
array $options
=
null
)
:
array
List all queues.
Inherited from: \Zend_Cloud_QueueService_Adapter::listQueues()Name | Type | Description |
---|---|---|
$options | array |
Type | Description |
---|---|
array | Queue IDs |

peekMessages(
string $queueId, int $num
=
1, array $options
=
null
)
:
\array[Zend_Cloud_QueueService_Message]
Peek at the messages from the specified queue without removing them.
Inherited from: \Zend_Cloud_QueueService_Adapter::peekMessages()Name | Type | Description |
---|---|---|
$queueId | string | |
$num | int | How many messages |
$options | array |
Type | Description |
---|---|
\array[Zend_Cloud_QueueService_Message] |

receiveMessages(
string $queueId, int $max
=
1, array $options
=
null
)
:
\array[Zend_Cloud_QueueService_Message]
Recieve at most $max messages from the specified queue and return the message IDs for messages recieved.
Inherited from: \Zend_Cloud_QueueService_Adapter::receiveMessages()Name | Type | Description |
---|---|---|
$queueId | string | |
$max | int | |
$options | array |
Type | Description |
---|---|
\array[Zend_Cloud_QueueService_Message] | Array of messages |

sendMessage(
string $queueId, string $message, array $options
=
null
)
:
string
Send a message to the specified queue.
Inherited from: \Zend_Cloud_QueueService_Adapter::sendMessage()Name | Type | Description |
---|---|---|
$queueId | string | |
$message | string | |
$options | array |
Type | Description |
---|---|
string | Message ID |

setMessageClass(
string $class
)
:
\Zend_Cloud_QueueService_Adapter_AbstractAdapter
Set class to use for message objects
Name | Type | Description |
---|---|---|
$class | string |
Type | Description |
---|---|
\Zend_Cloud_QueueService_Adapter_AbstractAdapter |

setMessageSetClass(
string $class
)
:
\Zend_Cloud_QueueService_Adapter_AbstractAdapter
Set class to use for message collection objects
Name | Type | Description |
---|---|---|
$class | string |
Type | Description |
---|---|
\Zend_Cloud_QueueService_Adapter_AbstractAdapter |

storeQueueMetadata(
string $queueId, array $metadata, array $options
=
null
)
:
void
Store a key/value array of metadata for the specified queue.
Inherited from: \Zend_Cloud_QueueService_Adapter::storeQueueMetadata()WARNING: This operation overwrites any metadata that is located at $destinationPath. Some adapters may not support this method.
Name | Type | Description |
---|---|---|
$queueId | string | |
$metadata | array | |
$options | array |