Skip to content

Commit 201e6f7

Browse files
committed
Added rabbitmq to send events
1 parent c4d4113 commit 201e6f7

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed

src/libs/amqp.server.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,8 @@ export const initAMQP = () => {
2727
channel.assertExchange(exchangeName, 'topic', {
2828
durable: true,
2929
autoDelete: false,
30-
arguments: {
31-
queueType: 'quorum',
32-
},
3330
});
31+
3432
amqpChannel = channel;
3533

3634
logger.info('AMQP initialized');

src/whatsapp/services/whatsapp.service.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -597,14 +597,11 @@ export class WAStartupService {
597597

598598
if (amqp) {
599599
if (Array.isArray(rabbitmqLocal) && rabbitmqLocal.includes(we)) {
600-
const exchangeName = 'evolution_exchange';
600+
const exchangeName = this.instanceName ?? 'evolution_exchange';
601601

602602
amqp.assertExchange(exchangeName, 'topic', {
603603
durable: true,
604604
autoDelete: false,
605-
arguments: {
606-
queueType: 'quorum',
607-
},
608605
});
609606

610607
const queueName = `${this.instanceName}.${event}`;
@@ -613,7 +610,7 @@ export class WAStartupService {
613610
durable: true,
614611
autoDelete: false,
615612
arguments: {
616-
queueType: 'quorum',
613+
'x-queue-type': 'quorum',
617614
},
618615
});
619616

0 commit comments

Comments
 (0)