Skip to content

Commit

Permalink
Merge pull request #163 from BIDMCDigitalPsychiatry/handle-nats-rejec…
Browse files Browse the repository at this point in the history
…tions

#fixes nats reconnect
  • Loading branch information
ZCOEngineer authored Nov 15, 2021
2 parents 8fd128b + 752c07f commit 25de654
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/repository/Bootstrap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,7 @@ export async function Bootstrap(): Promise<void> {
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")
Expand All @@ -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")
Expand Down

0 comments on commit 25de654

Please sign in to comment.