2021-12-11 10:07:40 -06:00
|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
use Laminas\ServiceManager\AbstractFactory\ConfigAbstractFactory;
|
|
|
|
use Laminas\ServiceManager\Proxy\LazyServiceFactory;
|
|
|
|
use PhpAmqpLib\Connection\AMQPStreamConnection;
|
|
|
|
|
2022-01-04 10:50:41 -06:00
|
|
|
use function Shlinkio\Shlink\Config\env;
|
2021-12-11 10:07:40 -06:00
|
|
|
|
|
|
|
return [
|
|
|
|
|
2021-12-12 03:32:57 -06:00
|
|
|
'rabbitmq' => [
|
2021-12-11 14:04:16 -06:00
|
|
|
'enabled' => (bool) env('RABBITMQ_ENABLED', false),
|
2021-12-11 10:07:40 -06:00
|
|
|
'host' => env('RABBITMQ_HOST'),
|
2021-12-12 03:32:57 -06:00
|
|
|
'port' => (int) env('RABBITMQ_PORT', '5672'),
|
2021-12-11 10:07:40 -06:00
|
|
|
'user' => env('RABBITMQ_USER'),
|
|
|
|
'password' => env('RABBITMQ_PASSWORD'),
|
|
|
|
'vhost' => env('RABBITMQ_VHOST', '/'),
|
|
|
|
],
|
|
|
|
|
|
|
|
'dependencies' => [
|
|
|
|
'factories' => [
|
|
|
|
AMQPStreamConnection::class => ConfigAbstractFactory::class,
|
|
|
|
],
|
|
|
|
'delegators' => [
|
|
|
|
AMQPStreamConnection::class => [
|
|
|
|
LazyServiceFactory::class,
|
|
|
|
],
|
|
|
|
],
|
|
|
|
'lazy_services' => [
|
|
|
|
'class_map' => [
|
|
|
|
AMQPStreamConnection::class => AMQPStreamConnection::class,
|
|
|
|
],
|
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
ConfigAbstractFactory::class => [
|
|
|
|
AMQPStreamConnection::class => [
|
2021-12-12 03:32:57 -06:00
|
|
|
'config.rabbitmq.host',
|
|
|
|
'config.rabbitmq.port',
|
|
|
|
'config.rabbitmq.user',
|
|
|
|
'config.rabbitmq.password',
|
|
|
|
'config.rabbitmq.vhost',
|
2021-12-11 10:07:40 -06:00
|
|
|
],
|
|
|
|
],
|
|
|
|
|
|
|
|
];
|