Skip to content

Commit

Permalink
move queuegroup warning
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Siwiec <[email protected]>
  • Loading branch information
rizzza committed Jan 22, 2024
1 parent b96dd43 commit 91543bb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 0 additions & 4 deletions events/nats_config.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,6 @@ type NATSConfig struct {

// Configured checks whether the provider has been configured.
func (c NATSConfig) Configured() bool {
if c.QueueGroup == "" {
c.logger.Warn("NATS QueueGroup is not set. Subscriptions will not be durable.")
}

return c.URL != ""
}

Expand Down
4 changes: 4 additions & 0 deletions events/nats_connection.go
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,10 @@ func NewNATSConnection(config NATSConfig, options ...NATSOption) (*NATSConnectio
}
}

if config.QueueGroup == "" {
nc.logger.Warn("NATS QueueGroup is not set. Subscriptions will not be durable.")
}

conn, err := nats.Connect(config.URL, nc.connectOptions...)
if err != nil {
return nil, err
Expand Down

0 comments on commit 91543bb

Please sign in to comment.