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

GrahamCampbell picture GrahamCampbell  路  139Comments

Xerotherm1c picture Xerotherm1c  路  70Comments

sebastianbergmann picture sebastianbergmann  路  93Comments

thewinterwind picture thewinterwind  路  63Comments

PheRum picture PheRum  路  112Comments