Laravel Horizon and SQS

226 views Asked by At

The Laravel documentation states:

Laravel Horizon requires that you use Redis to power your queue. Therefore, you should ensure that your queue connection is set to redis in your application's config/queue.php configuration file.

I understand Horizon uses Redis for its management/state, but the Laravel architecture allows for various queue connections so I am confused by the your queue part of that statement since we can have many queues. Is it not possible to have Horizon manage tasks to and from SQS queues?

SQS Offers many benefits with the visibility, retention, and DLQ redrive that Redis+Horizon simply do not have and cannot be easily extended to do.

1

There are 1 answers

0
Azeame On

That's correct, as the documentation states Laravel Horizon is a Redis Queue Runner. It was specifically built to monitor Redis Queues as it implements Redis-specific watchers and interactions that are not compatible with SQS. You cannot use Laravel Horizon to monitor your SQS, database, or other queue providers.

You can look into Amazon already has a dedicated way to monitor your SQS (Amazon CloudWatch) or you can use an alternative monitoring system such as DataDogHQ.com or similar.

If you are looking for a Laravel-based approach have you considered Laravel Pulse as it may be able to work with SQS (I don't use SQS so I cannot confirm).