diff --git a/internal/event/target/nats.go b/internal/event/target/nats.go index fef12fe26..70c0f8d8d 100644 --- a/internal/event/target/nats.go +++ b/internal/event/target/nats.go @@ -160,7 +160,7 @@ func (n NATSArgs) Validate() error { // To obtain a nats connection from args. func (n NATSArgs) connectNats() (*nats.Conn, error) { - connOpts := []nats.Option{nats.Name("Minio Notification")} + connOpts := []nats.Option{nats.Name("Minio Notification"), nats.MaxReconnects(-1)} if n.Username != "" && n.Password != "" { connOpts = append(connOpts, nats.UserInfo(n.Username, n.Password)) }