Skip to content
This repository has been archived by the owner on Jul 2, 2024. It is now read-only.

resolve #37 and #38 #40

Merged
merged 1 commit into from
Jun 29, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 62 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,28 @@ for enabling the AWS ZF2 module.
> Starting from 0.3.0, SlmQueueSqs now internally uses the official AWS Zend Framework 2 module, so you can write
your credentials only once for all AWS services.


Configuring AWS
---------------

Version must be specified for AWS SQS!

```
<?php
return [
'aws' => [
'credentials' => [
'key' => 'ACCESS_KEY_GOES_HERE',
'secret' => 'SECRET_KEY_GOES_HERE'
],
'region' => 'us-east-1', ## or your region ##
'Sqs' => [
'version' => '2012-11-05' ## suggested to code this to a specific version of the SQS API.
]
]
];
```

Documentation
-------------

Expand Down Expand Up @@ -83,7 +105,8 @@ A concrete class that implements this interface is included: `SlmQueueSqs\Queue\
create Sqs queues. Therefore, if you want to have a queue called "newsletter", just add the following line in your
`module.config.php` file:

```php
```
<?php
return array(
'slm_queue' => array(
'queue_manager' => array(
Expand Down Expand Up @@ -146,7 +169,8 @@ You may want to explicitly set queue URL instead of having it automatically fetc
if you want to use different queues in prod and test environments, while still referencing it using the same
queue name in your code). To do so, add the following config:

```php
```
<?php
return array(
'slm_queue' => array(
'queues' => array(
Expand All @@ -171,3 +195,39 @@ The queue name is a mandatory parameter, while the other parameters are all opti

* visibilityTimeout: duration (in seconds) that the received messages are hidden from subsequent retrieve requests after being retrieved by a pop request
* waitTime: wait time (in seconds) for which the call will wait for a job to arrive in the queue before returning



Troubleshooting
---------------

Issue:

```
no instance returnedMissing required client configuration options:

version: (string)

A "version" configuration value is required. Specifying a version constraint
ensures that your code will not be affected by a breaking change made to the
service. For example, when using Amazon S3, you can lock your API version to
"2006-03-01".

Your build of the SDK has the following version(s) of "sqs": * "2012-11-05"

You may provide "latest" to the "version" configuration value to utilize the
most recent available API version that your client's API provider can find.
Note: Using 'latest' in a production application is not recommended.

A list of available API versions can be found on each client's API documentation
page: http://docs.aws.amazon.com/aws-sdk-php/v3/api/index.html. If you are
unable to load a specific API version, then you may need to update your copy of
the SDK.======================================================================
The application has thrown an exception!
======================================================================
Zend\ServiceManager\Exception\ServiceNotCreatedException
The factory was called but did not return an instance.

```

Solution: See above Aws configuration example for version definition.
2 changes: 1 addition & 1 deletion src/SlmQueueSqs/Factory/SqsQueueFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,6 @@ public function createService(ServiceLocatorInterface $serviceLocator, $name = '
{
$parentLocator = $serviceLocator->getServiceLocator();

return $this($parentLocator, SqsQueue::class);
return $this($parentLocator, $requestedName);
}
}