Skip to content

Commit

Permalink
Fix: Fixed global exchange name and updated database connection clien…
Browse files Browse the repository at this point in the history
…t name

This commit resolves an issue with the global exchange name and updates the database connection client name. The `.env.example`, `CHANGELOG.md`, and `src/api/integrations/rabbitmq/libs/amqp.server.ts` files were modified. The exchange name in the AMQP server and global queues initialization has been changed to use the value from the configuration service. Additionally, the database connection client name has been updated in the `.env.example` file. The change in the `CHANGELOG.md` file has been updated accordingly.
  • Loading branch information
dgcode-tec committed Jul 17, 2024
1 parent 7e9132f commit b907d85
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down
4 changes: 2 additions & 2 deletions src/api/integrations/rabbitmq/libs/amqp.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const initAMQP = () => {
return;
}

const exchangeName = 'evolution_exchange';
const exchangeName = configService.get<Rabbitmq>('RABBITMQ').EXCHANGE_NAME || 'evolution_exchange';

channel.assertExchange(exchangeName, 'topic', {
durable: true,
Expand Down Expand Up @@ -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>('RABBITMQ').EXCHANGE_NAME || 'evolution_exchange';

amqp.assertExchange(exchangeName, 'topic', {
durable: true,
Expand Down

0 comments on commit b907d85

Please sign in to comment.