From c3ba2d96a0f2a8c2d5f20054e9698e89dd43d8ad Mon Sep 17 00:00:00 2001 From: Jibola Paul Date: Sat, 15 Nov 2025 02:32:51 +0100 Subject: [PATCH] fix: fix ttl mismtach error in queue --- api-gateway/src/notification/rabbitmq.service.ts | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/api-gateway/src/notification/rabbitmq.service.ts b/api-gateway/src/notification/rabbitmq.service.ts index d7ccf66..fa28a7c 100644 --- a/api-gateway/src/notification/rabbitmq.service.ts +++ b/api-gateway/src/notification/rabbitmq.service.ts @@ -23,8 +23,18 @@ export class RabbitMQService implements OnModuleInit, OnModuleDestroy { 'x-message-ttl': 86400000, }, }); - await channel.assertQueue('push.queue', { durable: true }); - await channel.assertQueue('failed.queue', { durable: true }); + await channel.assertQueue('push.queue', { + durable: true, + arguments: { + 'x-message-ttl': 86400000, + }, + }); + await channel.assertQueue('failed.queue', { + durable: true, + arguments: { + 'x-message-ttl': 86400000, + }, + }); }, });