Framework: How to specify queue name in event listeners

Created on 16 Sep 2015  路  5Comments  路  Source: laravel/framework

When using jobs, we can dispatch job to queue by specifing the onQueue('queueName'), but how to specify in case of event and its listeners.

Most helpful comment

I was looking for this as well, It took me quite a while to find it actually.

Here is the solution: https://github.com/laravel/framework/pull/9869#issuecomment-150181293

All 5 comments

Duplicate.

if it is duplicate, please specify the duplicate issue. i have checked but no luck.

I was looking for this as well, It took me quite a while to find it actually.

Here is the solution: https://github.com/laravel/framework/pull/9869#issuecomment-150181293

oh, thanks @sakalauskas

U can set a property $queue = 'your_name_queue' in class Listener u created.
I have test on laravel 5.5. It's ok... Before u have created two app to run multiple queue work.
php artisan queue:work database --queue=job_spider
php artisan queue:work database --queue=job_user

Was this page helpful?
0 / 5 - 0 ratings

Related issues

lzp819739483 picture lzp819739483  路  3Comments

jackmu95 picture jackmu95  路  3Comments

PhiloNL picture PhiloNL  路  3Comments

YannPl picture YannPl  路  3Comments

klimentLambevski picture klimentLambevski  路  3Comments