From e1c64b3965359a2d97c004a658e879085e01ea38 Mon Sep 17 00:00:00 2001 From: Kristofer Date: Wed, 6 Nov 2024 10:15:39 +0000 Subject: [PATCH 1/4] Add queueName to QueueService --- libs/message-queue/src/lib/nest/queue.service.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/libs/message-queue/src/lib/nest/queue.service.ts b/libs/message-queue/src/lib/nest/queue.service.ts index 2088a8915fa3..5968b15cee03 100644 --- a/libs/message-queue/src/lib/nest/queue.service.ts +++ b/libs/message-queue/src/lib/nest/queue.service.ts @@ -7,8 +7,11 @@ import type { Queue } from './types' @Injectable() export class QueueService implements OnApplicationBootstrap { private _url: string | null = null + queueName: string - constructor(private client: ClientService, private config: Queue) {} + constructor(private client: ClientService, private config: Queue) { + this.queueName = config.queueName + } // NB: We initialize the queues using "onApplicationBootstrap" rather than an // async "useFactory" because creating the nest application (like the From 81ad7e9f97b686c1027de11ffe94943bfc6878a5 Mon Sep 17 00:00:00 2001 From: Kristofer Date: Wed, 6 Nov 2024 10:16:39 +0000 Subject: [PATCH 2/4] Log queue info --- .../src/app/modules/notifications/notifications.controller.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/services/user-notification/src/app/modules/notifications/notifications.controller.ts b/apps/services/user-notification/src/app/modules/notifications/notifications.controller.ts index 27baab66a5f4..22c2b01c1cde 100644 --- a/apps/services/user-notification/src/app/modules/notifications/notifications.controller.ts +++ b/apps/services/user-notification/src/app/modules/notifications/notifications.controller.ts @@ -105,6 +105,7 @@ export class NotificationsController { messageId: id, ...flattenedArgs, ...body, + queue: { url: this.queue.url, name: this.queue.queueName }, }) return { From fa7174cbdddaf2185a2fbebe1115170f6873789b Mon Sep 17 00:00:00 2001 From: Kristofer Date: Fri, 8 Nov 2024 09:33:33 +0000 Subject: [PATCH 3/4] No args --- .../src/app/modules/notifications/notifications.controller.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/apps/services/user-notification/src/app/modules/notifications/notifications.controller.ts b/apps/services/user-notification/src/app/modules/notifications/notifications.controller.ts index 22c2b01c1cde..d3f6ad89f1d2 100644 --- a/apps/services/user-notification/src/app/modules/notifications/notifications.controller.ts +++ b/apps/services/user-notification/src/app/modules/notifications/notifications.controller.ts @@ -105,6 +105,7 @@ export class NotificationsController { messageId: id, ...flattenedArgs, ...body, + args: {}, queue: { url: this.queue.url, name: this.queue.queueName }, }) From 6f74885e872eb0d75f1cd74371ffbe15cbc543be Mon Sep 17 00:00:00 2001 From: Kristofer Date: Fri, 8 Nov 2024 10:37:13 +0000 Subject: [PATCH 4/4] Comment --- .../src/app/modules/notifications/notifications.controller.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/services/user-notification/src/app/modules/notifications/notifications.controller.ts b/apps/services/user-notification/src/app/modules/notifications/notifications.controller.ts index d3f6ad89f1d2..a1425841a8b8 100644 --- a/apps/services/user-notification/src/app/modules/notifications/notifications.controller.ts +++ b/apps/services/user-notification/src/app/modules/notifications/notifications.controller.ts @@ -105,7 +105,7 @@ export class NotificationsController { messageId: id, ...flattenedArgs, ...body, - args: {}, + args: {}, // Remove args, since they're in a better format in `flattenedArgs` queue: { url: this.queue.url, name: this.queue.queueName }, })