Skip to content

Commit

Permalink
adds name to nats connection (#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
jordan-rash authored Mar 26, 2024
1 parent 77ae1d4 commit c5fc403
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion internal/models/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,14 @@ func GenerateConnectionFromOpts(opts *Options) (*nats.Conn, error) {
return nil, err
}

conn, err := opts.Configuration.Connect()
conn, err := opts.Configuration.Connect(nats.Name(
func() string {
if opts.ConnectionName == "" {
return "nex"
}
return opts.ConnectionName
}(),
))
if err != nil {
return nil, err
}
Expand Down

0 comments on commit c5fc403

Please sign in to comment.