mirror of
https://github.com/EvolutionAPI/evolution-api.git
synced 2025-07-16 04:02:54 -06:00
Added rabbitmq to send events
This commit is contained in:
parent
c4d41134b8
commit
201e6f7e7b
@ -27,10 +27,8 @@ export const initAMQP = () => {
|
|||||||
channel.assertExchange(exchangeName, 'topic', {
|
channel.assertExchange(exchangeName, 'topic', {
|
||||||
durable: true,
|
durable: true,
|
||||||
autoDelete: false,
|
autoDelete: false,
|
||||||
arguments: {
|
|
||||||
queueType: 'quorum',
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
amqpChannel = channel;
|
amqpChannel = channel;
|
||||||
|
|
||||||
logger.info('AMQP initialized');
|
logger.info('AMQP initialized');
|
||||||
|
@ -597,14 +597,11 @@ export class WAStartupService {
|
|||||||
|
|
||||||
if (amqp) {
|
if (amqp) {
|
||||||
if (Array.isArray(rabbitmqLocal) && rabbitmqLocal.includes(we)) {
|
if (Array.isArray(rabbitmqLocal) && rabbitmqLocal.includes(we)) {
|
||||||
const exchangeName = 'evolution_exchange';
|
const exchangeName = this.instanceName ?? 'evolution_exchange';
|
||||||
|
|
||||||
amqp.assertExchange(exchangeName, 'topic', {
|
amqp.assertExchange(exchangeName, 'topic', {
|
||||||
durable: true,
|
durable: true,
|
||||||
autoDelete: false,
|
autoDelete: false,
|
||||||
arguments: {
|
|
||||||
queueType: 'quorum',
|
|
||||||
},
|
|
||||||
});
|
});
|
||||||
|
|
||||||
const queueName = `${this.instanceName}.${event}`;
|
const queueName = `${this.instanceName}.${event}`;
|
||||||
@ -613,7 +610,7 @@ export class WAStartupService {
|
|||||||
durable: true,
|
durable: true,
|
||||||
autoDelete: false,
|
autoDelete: false,
|
||||||
arguments: {
|
arguments: {
|
||||||
queueType: 'quorum',
|
'x-queue-type': 'quorum',
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user