1. Go to this page and download the library: Download mehr-it/lara-sqs-ext 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/ */
mehr-it / lara-sqs-ext example snippets
'sqs-conn' => [
'driver' => 'sqs-ext',
'key' => '112233445566778899',
'secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxx',
'prefix' => 'https://sqs.eu-central-1.amazonaws.com/11223344556677',
'queue' => 'msgs',
'region' => 'eu-central-1',
'cache' => 'the-centralized-cache',
'throttles'=> [
// queue name or wildcard as key
'msgs' => [
// the number of tokens added per second
'rate' => 0.5,
// the maximum number of tokens in the bucket
'burst' => 4,
// the initial number of tokens in the bucket
'initial' => 0,
]
]
],
'sqs-conn' => [
'driver' => 'sqs-ext',
'key' => '112233445566778899',
'secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxx',
'prefix' => 'https://sqs.eu-central-1.amazonaws.com/11223344556677',
'queue' => 'apiQueue1',
'region' => 'eu-central-1',
// use a centralized cache
'cache' => 'the-centralized-cache',
'throttles' => [
// queue name or wildcard as key
'apiQueue*' => [
// the number of tokens added per second
'rate' => 0.5,
// the maximum number of tokens in the bucket
'burst' => 4,
]
]
],
'sqs-conn' => [
'driver' => 'sqs-ext',
'key' => '112233445566778899',
'secret' => 'xxxxxxxxxxxxxxxxxxxxxxxxxx',
'prefix' => 'https://sqs.eu-central-1.amazonaws.com/11223344556677',
'queue' => 'apiQueue1',
'region' => 'eu-central-1',
// Long polling must not be used with wildcard workers, as this disables
// queue pausing which is more efficient than long polling when working
// on multiple queues.
'message_wait_timeout' => 0,
// use a centralized cache
'cache' => 'the-centralized-cache',
// interval for regular queue list updates (in seconds)
'throttles' => [
/* define throttles here */
],
'queue_list_update_interval' => 60,
// Maximum pause time, for empty queues (in seconds).
// This value must not be too high, since delayed or in-the-flight
// messages are not visible. The queue might look empty but will
// have available messages later without the worker pause being aborted.
'queue_pause_time' => 20,
],
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.