From 752c07fed97390438dd476be15f19b5476a24592 Mon Sep 17 00:00:00 2001 From: "ITHQ1861\\linoy.gopal" Date: Fri, 12 Nov 2021 19:23:46 +0530 Subject: [PATCH] #fixes nats reconnect --- src/repository/Bootstrap.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/repository/Bootstrap.ts b/src/repository/Bootstrap.ts index afbfae31..1d5563dc 100644 --- a/src/repository/Bootstrap.ts +++ b/src/repository/Bootstrap.ts @@ -932,6 +932,7 @@ export async function Bootstrap(): Promise { export const nc = connect({ servers: [`${process.env.NATS_SERVER}`], payload: Payload.JSON, + maxReconnectAttempts:-1 }).then((x) => x.on("connect", (y) => { console.log("Connected to Nats Pub Server") @@ -940,6 +941,7 @@ export const nc = connect({ export const ncSub = connect({ servers: [`${process.env.NATS_SERVER}`], payload: Payload.JSON, + maxReconnectAttempts:-1 }).then((x) => x.on("connect", (y) => { console.log("Connected to Nats Sub Server")