arquivei / sqs-php-pipeline
This package is abandoned and no longer maintained.
No replacement package was suggested.
SQS PHP Pipeline
1.0.1
2018-07-17 18:47 UTC
Requires
- php: ^7.1.3
- aws/aws-sdk-php: ^3.0.0
- illuminate/support: ^5.6
Requires (Dev)
- phpunit/phpunit: ^7.0
This package is auto-updated.
Last update: 2021-12-06 03:37:09 UTC
README
Install
composer require arquivei/sqs-php-pipeline
If usage Laravel
Add sqs-php-pipeline.php
in your config
and configure your AWS credentials.
Laravel <= 5.4
Add the provider and facade in your config/app.php
'providers' => [
SQS\Pipeline\Providers\SQSPipelineServiceProvider::class,
]
'aliases' => [
'SQSPipeline' => SQS\Pipeline\Facades\SQSPipelineFacade::class,
]
Laravel >= 5.5
Add only facade in your config/app.php
'aliases' => [
'SQSPipeline' => SQS\Pipeline\Facades\SQSPipelineFacade::class,
]
After, run php artisan package:discover
to publish extras providers.
Run Tests
$ vendor/phpunit/phpunit/phpunit tests
Important
- In
SqsClient config
theservice
andversion
is hardcoded because the AWS methods are modified between versions.
Usage
$message = new SQS\Pipeline\Message(array $config);
// $queue (queue name)
// $messageBody (content of message)
// $messageAttributes (message attributes)
// $delaySeconds (delay to publish message)
// @return Aws\Result
$message->send($queue, $messageBody, $messageAttributes, $delaySeconds);
// $queue (queue name)
// @return array
$message->receive($queue)
// $queue (queue name)
// @return Aws\Result
$message->delete($queue)