PHP code example of spekkionu / sqs-queue-driver

1. Go to this page and download the library: Download spekkionu/sqs-queue-driver library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

spekkionu / sqs-queue-driver example snippets



use Aws\Sqs\SqsClient;
use PMG\Queue\Serializer\NativeSerializer;
Spekkionu\PMG\Queue\Sqs\Driver\SqsDriver;

$sqsClient = new SqsClient([
    'credentials' => [
        'key' => 'KEY',
        'secret' => 'SECRECT'
    ],
    'region' => 'us-east-1',
    'retries' => 3,
    'version' => '2012-11-05'
]);

$serializer = new NativeSerializer();
$driver = new SqsDriver($sqsClient, $serializer);