[英]Error related to AWS Sqs Queue in Laravel
I get this error in laravel when trying to access Queue -尝试访问队列时,我在 laravel 中收到此错误 -
Class 'Aws\Sqs\SqsClient' not found
My default queue is 'sync' and I have not required 'Sqs' anywhere in my composer.json.我的默认队列是“sync”,我的 composer.json 中的任何地方都不需要“Sqs”。 Then why is this happening?
那为什么会这样呢? Is it compulsory to include it in newer versions of Laravel.
是否必须将其包含在 Laravel 的较新版本中。
I use this package: https://github.com/aws/aws-sdk-php-laravel 我使用这个包: https : //github.com/aws/aws-sdk-php-laravel
This package AWS components with works! 这个包AWS组件有效!
I recommend it to you 我推荐给你
未满足的依赖性,所以你需要这样做
composer require aws/aws-sdk-php
First check value QUEUE_DRIVER in your .env file. 首先检查.env文件中的值QUEUE_DRIVER。 In your case it must be equal to „sync“
在你的情况下,它必须等于“同步”
QUEUE_DRIVER=sync
Than check your supervisor configuration file. 比检查您的主管配置文件。 Probably you forget to change this line:
可能你忘记改变这一行:
command=php /my/app/dir/artisan queue:work **sqs** ...
to 至
command=php /my/app/dir/artisan queue:work **sync** ...
as it described here: https://laravel.com/docs/5.7/queues#supervisor-configuration 如下所述: https : //laravel.com/docs/5.7/queues#supervisor-configuration
I had this config in the env file QUEUE_DRIVER=database
so in my case I had to run the command without sync or sqs我在 env 文件
QUEUE_DRIVER=database
中有这个配置所以在我的情况下我不得不运行没有同步或sqs的命令
command=php /my/app/dir/artisan queue:work ...
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.