Set NATS ACK wait to 1 second
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
1daac6c423
commit
2d5f22e0e8
2 changed files with 2 additions and 2 deletions
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue