API Documentation

Zend/Cloud/QueueService/Adapter/Sqs.php

Show: inherited
Table of Contents

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-2012 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\QueueService

SQS adapter for simple queue service.

Parent(s)
\Zend_Cloud_QueueService_Adapter_AbstractAdapter
Category
Zend  
Copyright
Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)  
License
New BSD License  

Constants

Constant  AWS_ACCESS_KEY = 'aws_accesskey'
Constant  AWS_SECRET_KEY = 'aws_secretkey'
Constant  CREATE_TIMEOUT = 30

Defaults

Properties

Propertyprotected\Zend_Service_Amazon_Sqs  $_sqs= ''

SQS service instance.

Methods

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

Constructor

Parameters
Name Type Description
$options array|\Zend_Config
methodprotected_makeMessages( array $messages ) : \Zend_Cloud_QueueService_Message[]

Create Zend_Cloud_QueueService_Message array for Sqs messages.

Parameters
Name Type Description
$messages array
Returns
Type Description
\Zend_Cloud_QueueService_Message[]
methodpubliccreateQueue( 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.

Parameters
Name Type Description
$name string
$options array
Returns
Type Description
string Queue ID (typically URL)
methodpublicdeleteMessage( string $queueId, \Zend_Cloud_QueueService_Message $message, array $options = null ) : void

Delete the specified message from the specified queue.

Parameters
Name Type Description
$queueId string
$message \Zend_Cloud_QueueService_Message
$options array
methodpublicdeleteQueue( string $queueId, array $options = null ) : boolean

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

Parameters
Name Type Description
$queueId string
$options array
Returns
Type Description
boolean true if successful, false otherwise
methodpublicfetchQueueMetadata( string $queueId, array $options = null ) : array

Get a key/value array of metadata for the given queue.

Parameters
Name Type Description
$queueId string
$options array
Returns
Type Description
array
methodpublicgetClient( ) : \Zend_Service_Amazon_Sqs

Get SQS implementation

Returns
Type Description
\Zend_Service_Amazon_Sqs
methodpubliclistQueues( array $options = null ) : array

List all queues.

Parameters
Name Type Description
$options array
Returns
Type Description
array Queue IDs
methodpublicpeekMessages( string $queueId, int $num = 1, array $options = null ) : \Zend_Cloud_QueueService_Message[]

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

Parameters
Name Type Description
$queueId string
$num int

How many messages

$options array
Returns
Type Description
\Zend_Cloud_QueueService_Message[]
methodpublicreceiveMessages( 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.

Parameters
Name Type Description
$queueId string
$max int
$options array
Returns
Type Description
array
methodpublicsendMessage( string $queueId, string $message, array $options = null ) : string

Send a message to the specified queue.

Parameters
Name Type Description
$queueId string
$message string
$options array
Returns
Type Description
string Message ID
methodpublicstoreQueueMetadata( 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.

Parameters
Name Type Description
$queueId string
$metadata array
$options array
Documentation was generated by DocBlox 0.15.1.