Laravel加载队列提供程序取决于您指向的配置。这意味着所有作业只能转到一种类型的队列。取决于作业类型我想将其发送到sqs队列或同步队列。任何想法怎么做?
答案 0 :(得分:-1)
在您的队列配置文件中:
'default' => 'sqs-west',
'connections' => array(
'sync' => array(
'driver' => 'sync',
),
'sqs-west' => array(
'driver' => 'sqs',
'key' => 'KEY',
'secret' => 'SECRET',
'queue' => 'ADDRESS',
'region' => 'eu-west-1',
),
'sqs-east' => array(
'driver' => 'sqs',
'key' => 'KEY',
'secret' => 'SECRET',
'queue' => 'ADDRESS',
'region' => 'eu-east-1,
),
然后你开始使用Artisan工作队列:
php artisan queue:work --queue=sqs-east
或
php artisan queue:work --queue=sqs-west