Zend_Service_Amazon_SqsIntroduction» Amazon Simple Queue Service (Amazon SQS) offers a reliable, highly scalable, hosted queue for storing messages as they travel between computers. By using Amazon SQS, developers can simply move data between distributed components of their applications that perform different tasks, without losing messages or requiring each component to be always available. Amazon SQS makes it easy to build an automated workflow, working in close conjunction with the Amazon Elastic Compute Cloud (Amazon EC2) and the other AWS infrastructure web services. Amazon SQS works by exposing Amazon's web-scale messaging infrastructure as a web service. Any computer on the Internet can add or read messages without any installed software or special firewall configurations. Components of applications using Amazon SQS can run independently, and do not need to be on the same network, developed with the same technologies, or running at the same time. Registering with Amazon SQSBefore you can get started with Zend_Service_Amazon_Sqs, you must first register for an account. Please see the » SQS FAQ page on the Amazon website for more information. After registering, you will receive an application key and a secret key. You will need both to access the SQS service. API DocumentationThe Zend_Service_Amazon_Sqs class provides the PHP wrapper to the Amazon SQS REST interface. Please consult the » Amazon SQS documentation for detailed description of the service. You will need to be familiar with basic concepts in order to use this service. FeaturesZend_Service_Amazon_Sqs provides the following functionality:
Getting StartedOnce you have registered with Amazon SQS, you're ready to create your queue and store some messages on SQS. Each queue can contain unlimited amount of messages, identified by name. The following example demonstrates creating a queue, storing and retrieving messages. Example #1 Zend_Service_Amazon_Sqs Usage Example
Since the Zend_Service_Amazon_Sqs service requires authentication, you should pass your credentials (AWS key and secret key) to the constructor. If you only use one account, you can set default credentials for the service: Queue operationsAll messages SQS are stored in queues. A queue has to be created before any message operations. Queue names must be unique under your access key and secret key. Queue names can contain lowercase letters, digits, periods (.), underscores (_), and dashes (-). No other symbols allowed. Queue names can be a maximum of 80 characters.
|
|