отдельно нужно тогда, когда нужна независимость и надёжность.
Например, queue может зависнуть, завесить весь воркер и все остальные queue в воркере.
Или нужны отдельные настройки для некоторых queue.
Я обычно создаю один воркер для high, medium, low
И отдельные воркеры под важные или тяжелые queue
пример
'defaults' => [
'supervisor-1' => [
'connection' => 'redis',
'queue' => ['high','medium', 'low'],
'balance' => 'simple',
'minProcesses' => 1,
'maxProcesses' => 5,
'balanceMaxShift' => 1,
'balanceCooldown' => 3,
'tries' => 3,
'timeout' => 600,
],
'supervisor-2' => [
'connection' => 'redis',
'queue' => [
\App\Services\QueueService::QUEUE_NAME__MEDIA_LIBRARY,
],
'balance' => 'simple',
'minProcesses' => 1,
'maxProcesses' => 2,
'balanceMaxShift' => 1,
'balanceCooldown' => 3,
'tries' => 3,
'timeout' => 60,
],
'supervisor-3' => [
'connection' => 'redis',
'queue' => [
\App\Services\QueueService::QUEUE_NAME__IMPORT_WEBHOOK,
],
'balance' => 'simple',
'minProcesses' => 1,
'maxProcesses' => 2,
'balanceMaxShift' => 1,
'balanceCooldown' => 3,
'tries' => 3,
'timeout' => 1200,
],
],
'environments' => [
'production' => [
'supervisor-1' => [
'minProcesses' => 1,
'maxProcesses' => 5,
],
'supervisor-2' => [
'minProcesses' => 1,
'maxProcesses' => 2,
],
'supervisor-3' => [
'minProcesses' => 1,
'maxProcesses' => 2,
],
],
'staging' => [
'supervisor-1' => [
'minProcesses' => 1,
'maxProcesses' => 2,
],
'supervisor-2' => [
'minProcesses' => 1,
'maxProcesses' => 2,
],
'supervisor-3' => [
'minProcesses' => 1,
'maxProcesses' => 2,
],
],
'local' => [
'supervisor-1' => [
'minProcesses' => 1,
'maxProcesses' => 4,
],
'supervisor-2' => [
'minProcesses' => 1,
'maxProcesses' => 2,
],
'supervisor-3' => [
'minProcesses' => 1,
'maxProcesses' => 2,
],
],
],