diff --git a/.env.example b/.env.example index 23557cbd..81b8bf8a 100644 --- a/.env.example +++ b/.env.example @@ -20,7 +20,7 @@ PROVIDER_PREFIX=evolution DATABASE_ENABLED=true DATABASE_PROVIDER=postgresql DATABASE_CONNECTION_URI='postgresql://user:pass@localhost:5432/evolution?schema=public' -DATABASE_CONNECTION_CLIENT_NAME=evolution +DATABASE_CONNECTION_CLIENT_NAME=evolution_exchange DATABASE_SAVE_DATA_INSTANCE=true DATABASE_SAVE_DATA_NEW_MESSAGE=true DATABASE_SAVE_MESSAGE_UPDATE=true diff --git a/CHANGELOG.md b/CHANGELOG.md index 2cfb9843..68587061 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ * Fixed the function of saving or not saving data in the database * Resolve not find name * Removed DEL_TEMP_INSTANCES as it is not being used +* Fixed global exchange name # 2.0.1-beta (2024-07-17 17:01) diff --git a/src/api/integrations/rabbitmq/libs/amqp.server.ts b/src/api/integrations/rabbitmq/libs/amqp.server.ts index 1aab9c6a..34b1ae46 100644 --- a/src/api/integrations/rabbitmq/libs/amqp.server.ts +++ b/src/api/integrations/rabbitmq/libs/amqp.server.ts @@ -23,7 +23,7 @@ export const initAMQP = () => { return; } - const exchangeName = 'evolution_exchange'; + const exchangeName = configService.get('RABBITMQ').EXCHANGE_NAME || 'evolution_exchange'; channel.assertExchange(exchangeName, 'topic', { durable: true, @@ -59,7 +59,7 @@ export const initGlobalQueues = () => { const queueName = `${event.replace(/_/g, '.').toLowerCase()}`; const amqp = getAMQP(); - const exchangeName = 'evolution_exchange'; + const exchangeName = configService.get('RABBITMQ').EXCHANGE_NAME || 'evolution_exchange'; amqp.assertExchange(exchangeName, 'topic', { durable: true,