Set NATS ACK wait to 1 second
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Søren Rasmussen 2022-07-29 01:04:25 +02:00
parent 1daac6c423
commit 2d5f22e0e8
2 changed files with 2 additions and 2 deletions

View file

@ -107,7 +107,7 @@ func mainLoop(ctx context.Context, wg *sync.WaitGroup, js nats.JetStream, config
}
// Publish to NATS
_, err = js.Publish(config.NATS.Subject.Event, b)
_, err = js.Publish(config.NATS.Subject.Event, b, nats.AckWait(1*time.Second))
if err != nil {
hub.CaptureException(err)
log.Print(err)

View file

@ -92,7 +92,7 @@ func publish(subject string, js nats.JetStream, hub *sentry.Hub, reading any) er
return err
}
_, err = js.Publish(subject, b)
_, err = js.Publish(subject, b, nats.AckWait(1*time.Second))
if err != nil {
hub.CaptureException(err)
log.Print(err)