Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error related to AWS Sqs Queue in Laravel

I get this error in laravel when trying to access Queue -

Class 'Aws\Sqs\SqsClient' not found

My default queue is 'sync' and I have not required 'Sqs' anywhere in my composer.json. Then why is this happening? Is it compulsory to include it in newer versions of Laravel.

like image 382
halkujabra Avatar asked Dec 05 '22 05:12

halkujabra


1 Answers

First check value QUEUE_DRIVER in your .env file. 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

like image 120
Anton Ganichev Avatar answered Dec 08 '22 15:12

Anton Ganichev