Configure Your Laravel Queues with AWS SQS

Introduction
Recently, I had to migrate my queue driver on a project from Redis to SQS and for some weird reason the information provided on the official Laravel Queues documentation didn’t do justice to this and I couldn’t find an article online that …

Introduction
Recently, I had to migrate my queue driver on a project from Redis to SQS and for some weird reason the information provided on the official Laravel Queues documentation didn’t do justice to this and I couldn’t find an article online that could help, that’s why I’m writing this, with the hope that you don’t spend two hours of your Saturday morning figuring stuff that should have been documented. I’d try to keep this article as brief as possible, I’d attach links to other articles that explain some steps so I can focus on the important parts.



Prerequisites

An existing Laravel application
An AWS account
An understanding of Laravel queues
Some AWS knowledge

If you use Laravel Horizon to manage your queues, you’d be making some modifications to your horizon.php file. For each worker defined, change the queue connection from redis which is the default to env(‘QUEUE_CONNECTION’)

Out of the box, Laravel dispatches jobs to the default queue, therefore, your first queue should be named default on SQS.

Configure Your Laravel Queues with AWS SQS


Print Share Comment Cite Upload Translate
APA
techdurjoy | Sciencx (2024-03-29T08:50:39+00:00) » Configure Your Laravel Queues with AWS SQS. Retrieved from https://www.scien.cx/2021/05/16/configure-your-laravel-queues-with-aws-sqs/.
MLA
" » Configure Your Laravel Queues with AWS SQS." techdurjoy | Sciencx - Sunday May 16, 2021, https://www.scien.cx/2021/05/16/configure-your-laravel-queues-with-aws-sqs/
HARVARD
techdurjoy | Sciencx Sunday May 16, 2021 » Configure Your Laravel Queues with AWS SQS., viewed 2024-03-29T08:50:39+00:00,<https://www.scien.cx/2021/05/16/configure-your-laravel-queues-with-aws-sqs/>
VANCOUVER
techdurjoy | Sciencx - » Configure Your Laravel Queues with AWS SQS. [Internet]. [Accessed 2024-03-29T08:50:39+00:00]. Available from: https://www.scien.cx/2021/05/16/configure-your-laravel-queues-with-aws-sqs/
CHICAGO
" » Configure Your Laravel Queues with AWS SQS." techdurjoy | Sciencx - Accessed 2024-03-29T08:50:39+00:00. https://www.scien.cx/2021/05/16/configure-your-laravel-queues-with-aws-sqs/
IEEE
" » Configure Your Laravel Queues with AWS SQS." techdurjoy | Sciencx [Online]. Available: https://www.scien.cx/2021/05/16/configure-your-laravel-queues-with-aws-sqs/. [Accessed: 2024-03-29T08:50:39+00:00]
rf:citation
» Configure Your Laravel Queues with AWS SQS | techdurjoy | Sciencx | https://www.scien.cx/2021/05/16/configure-your-laravel-queues-with-aws-sqs/ | 2024-03-29T08:50:39+00:00
https://github.com/addpipe/simple-recorderjs-demo