mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-26 18:38:39 -06:00
fix: rabbitMQ event hook
This commit is contained in:
parent
a020eb2310
commit
f0b93534d9
@ -657,14 +657,14 @@ export class WAStartupService {
|
|||||||
this.logger.verbose('Sending data to rabbitMQ on channel: ' + this.instance.name);
|
this.logger.verbose('Sending data to rabbitMQ on channel: ' + this.instance.name);
|
||||||
if (Array.isArray(rabbitmqLocal) && rabbitmqLocal.includes(we)) {
|
if (Array.isArray(rabbitmqLocal) && rabbitmqLocal.includes(we)) {
|
||||||
this.logger.verbose('Sending data to rabbitMQ on event: ' + event);
|
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', {
|
amqp.assertExchange(exchangeName, 'topic', {
|
||||||
durable: true,
|
durable: true,
|
||||||
autoDelete: false,
|
autoDelete: false,
|
||||||
});
|
});
|
||||||
|
|
||||||
const queueName = `${this.instanceName}.${event}`;
|
const queueName = `${this.instance.name}.${event}`;
|
||||||
|
|
||||||
amqp.assertQueue(queueName, {
|
amqp.assertQueue(queueName, {
|
||||||
durable: true,
|
durable: true,
|
||||||
|
Loading…
Reference in New Issue
Block a user