Cloud/QueueService/Adapter/Sqs.php
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.
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
- Package
- Zend_Cloud
- Subpackage
- QueueService
\Zend_Cloud_QueueService_Adapter_Sqs
Package: Zend_Cloud\QueueServiceSQS adapter for simple queue service.
Provides functionality around setting message and message set classes.
- Parent(s)
- \Zend_Cloud_QueueService_Adapter_AbstractAdapter
- Category
- Zend
- Copyright
- Copyright (c) 2005-2014 Zend Technologies USA Inc. (http://www.zend.com)
- License
- New BSD License
Constants
AWS_ACCESS_KEY
= 'aws_accesskey'
AWS_SECRET_KEY
= 'aws_secretkey'
Properties
Methods
_makeMessages(array $messages) : \Zend_Cloud_QueueService_Message[]
Create Zend_Cloud_QueueService_Message array for
Sqs messages.
ParametersName | Type | Description |
---|
$messages | array | |
---|
Returns createQueue(string $name, array $options = null) : string
Create a queue. Returns the ID of the created queue (typically the URL).
It may take some time to create the queue. Check your vendor's
documentation for details.
ParametersName | Type | Description |
---|
$name | string | |
---|
$options | array | |
---|
ReturnsType | Description |
---|
string | Queue ID (typically URL) |
deleteQueue(string $queueId, array $options = null) : boolean
Delete a queue. All messages in the queue will also be deleted.
ParametersName | Type | Description |
---|
$queueId | string | |
---|
$options | array | |
---|
ReturnsType | 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.
ParametersName | Type | Description |
---|
$queueId | string | |
---|
$options | array | |
---|
Returns peekMessages(string $queueId, int $num = 1, array $options = null) : \Zend_Cloud_QueueService_Message[]
Peek at the messages from the specified queue without removing them.
ParametersName | Type | Description |
---|
$queueId | string | |
---|
$num | int | How many messages |
---|
$options | array | |
---|
Returns receiveMessages(string $queueId, int $max = 1, array $options = null) : array
Recieve at most $max messages from the specified queue and return the
message IDs for messages recieved.
ParametersName | Type | Description |
---|
$queueId | string | |
---|
$max | int | |
---|
$options | array | |
---|
Returns sendMessage(string $queueId, string $message, array $options = null) : string
Send a message to the specified queue.
ParametersName | Type | Description |
---|
$queueId | string | |
---|
$message | string | |
---|
$options | array | |
---|
ReturnsType | Description |
---|
string | Message ID |
storeQueueMetadata(string $queueId, array $metadata, array $options = null) : void
Store a key/value array of metadata for the specified queue.
WARNING: This operation overwrites any metadata that is located at
$destinationPath. Some adapters may not support this method.
ParametersName | Type | Description |
---|
$queueId | string | |
---|
$metadata | array | |
---|
$options | array | |
---|