Improvements in RabbitMQ, added 2 new modes

This commit is contained in:
Judson Cairo
2024-03-04 20:24:15 -03:00
parent 7dd589fb6c
commit ac6e9ae994
7 changed files with 148 additions and 55 deletions

View File

@@ -71,7 +71,8 @@ export type Redis = {
export type Rabbitmq = {
ENABLED: boolean;
GLOBAL_EVENT_QUEUE: boolean;
MODE: 'isolated' | 'global' | 'single';
EXCHANGE_NAME: string; // available for global and single, isolated mode will use instance name as exchange
URI: string;
};
@@ -283,7 +284,8 @@ export class ConfigService {
},
RABBITMQ: {
ENABLED: process.env?.RABBITMQ_ENABLED === 'true',
GLOBAL_EVENT_QUEUE: process.env?.RABBITMQ_GLOBAL_EVENT_QUEUE === 'true',
MODE: (process.env?.RABBITMQ_MODE as Rabbitmq['MODE']) || 'single',
EXCHANGE_NAME: process.env?.RABBITMQ_EXCHANGE_NAME || 'evolution_exchange',
URI: process.env.RABBITMQ_URI || '',
},
SQS: {