Use non-default Laravel 4.2 Queue Connection -


i need swap out laravel queue connection when queue items.

e.g. default redis need swap out use sqs when queue items.

is there anyway without having change default queue connection using config::set('queue.default', 'sqs');?

i notice it's easy specify queue name use passing third argument queue:push(), let's change queue name, not queue connection itself.

you can use queue::connection swith connection.

queue::connection('new-connection')->push('queueclass@queuemethod', [], 'queue-name'); 

Comments

Popular posts from this blog

c++ - Difference between pre and post decrement in recursive function argument -

php - Nothing but 'run(); ' when browsing to my local project, how do I fix this? -

php - How can I echo out this array? -