How I get Queues to work with AWS Elastic Beanstalk Worker Tiers?
So I got the Queue system to work perfectly on the web tier. Architecturally I know the worker tier is meant to do the backend queue tasks so even though a regular web tier works, I want to get it up and running in a worker environment as well.
SQS seems to POST to a user-defined url for the worker tier which I assume is all the queue commands.
How do I get my Laravel App to run in the Worker Tier Environment? If I needed to setup a route to catch the post data, how do I then get Laravel to execute this job?
This would be awesome if there is a series about AWS of setting up of: Web tier + Worker Tier + S3 Storage + RDS. Then you have almost unlimited scalability of a web app with low pricing
framework/src/Illuminate/Queue/Worker.php
public function process($connection, Job $job, $maxTries = 0, $delay = 0) { }
Pass $connection and Job $job.
$job could probably be looked up by the SQS Request Headers when Elastic Beanstalk's Workers Environment pings your EC2 server. It'll pass over everything related to the message, there is likely a job_id in it. We've use the workers environment before, but I've never used it on Laravel.
Then just figure out how to pass over the $connection.
@dusterio I just installed your package and it seems pretty straight forward. One question I have though. Should I define the routes in my web.php also? or how can I work with the data posted back to me from the SQS?
I am doing something like this now in the web.php: