From 5b00d0db0986fc1732cafab538e4461e63e3960c Mon Sep 17 00:00:00 2001 From: ashish-egov <137176738+ashish-egov@users.noreply.github.com> Date: Fri, 2 Aug 2024 12:10:50 +0530 Subject: [PATCH] Update Producer.ts --- utilities/project-factory/src/server/kafka/Producer.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/utilities/project-factory/src/server/kafka/Producer.ts b/utilities/project-factory/src/server/kafka/Producer.ts index fb89e29b649..dc19acc2fa1 100644 --- a/utilities/project-factory/src/server/kafka/Producer.ts +++ b/utilities/project-factory/src/server/kafka/Producer.ts @@ -62,6 +62,7 @@ const sendWithRetries = (payloads: any[], retries = 3, shutdown: boolean = false producer.send(payloads, async (err: any) => { if (err) { logger.error('Error sending message:', err); + logger.debug(`Was trying to send: ${JSON.stringify(payloads)}`); if (retries > 0) { logger.info(`Retrying to send message. Retries left: ${retries}`); await new Promise(resolve => setTimeout(resolve, 2000)); // wait before retrying