You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Joshua Estes edited this page Oct 4, 2017
·
4 revisions
AWS SQS Queue
The SqsQueue allows you to use AWS SQS. It supports both Standard and FIFO queues.
You MUST install the AWS PHP SDK in order to use this queue.
composer require aws/aws-sdk-php
Usage
<?phpuseAws\Credentials\Credentials;
useAws\Sqs\SqsClient;
useDspacelabs\Component\Queue\SqsQueue;
$credentials = newCredentials($accessKey, $secretKey);
$client = newSqsClient([
'version' => 'latest',
'region' => 'us-east-1',
'credentials' => $credentials,
]);
/** * $client = The SqsClient from the AWS SDK * $queueUrl = The SQS Queue URL provided by AWS, just view the Queue details in AWS * $name = The name you want to give your queue. This should be unique within your App * and is not related to anything AWS */$queue = newSqsQueue($client, $queueUrl, $name);
FIFO Queues
In order to use FIFO Queues you need to add some message attributes like this