dusterio / laravel-plain-sqs

Custom SQS connector for Laravel (or Lumen) that supports third-party, plain JSON messages
MIT License
131 stars 93 forks source link

Different sending and listening queues? #13

Open curtisshipley opened 7 years ago

curtisshipley commented 7 years ago

How would I configure laravel-plain-sqs if I want to listen to one particular queue, but send to another?

dusterio commented 7 years ago

You could either create one more connection in config/queue.php using the same driver (sqs-plain) or use Laravel's onQueue() method when you dispatch a job - this will override the queue name (leaving the same AWS customer id/region/etc)

curtisshipley commented 7 years ago

Thank you!

curtisshipley commented 7 years ago

Another question for you. I'm using laravel 5.4. When I pasted the code from the readme for receiving messages, it gave me a class not found error for app/Jobs/Job. If I comment out 'extends Job' from my handler, then it runs, but handle() is never called and the message is never pull from the queue.

Do I need to define a Job class, and if so, what should it look like?

curtisshipley commented 7 years ago

I got it working. I ended up just not subclassing job.