fix: rabbitMQ event hook

This commit is contained in:
Gabriel Pastori 2023-09-07 23:59:51 -03:00
parent a020eb2310
commit f0b93534d9

View File

@ -657,14 +657,14 @@ export class WAStartupService {
this.logger.verbose('Sending data to rabbitMQ on channel: ' + this.instance.name);
if (Array.isArray(rabbitmqLocal) && rabbitmqLocal.includes(we)) {
this.logger.verbose('Sending data to rabbitMQ on event: ' + event);
const exchangeName = this.instanceName ?? 'evolution_exchange';
const exchangeName = this.instance.name ?? 'evolution_exchange';
amqp.assertExchange(exchangeName, 'topic', {
durable: true,
autoDelete: false,
});
const queueName = `${this.instanceName}.${event}`;
const queueName = `${this.instance.name}.${event}`;
amqp.assertQueue(queueName, {
durable: true,