diff --git a/server/opts.go b/server/opts.go index cbb37533233..0357c075b92 100644 --- a/server/opts.go +++ b/server/opts.go @@ -2094,12 +2094,19 @@ func parseJetStreamForAccount(v any, acc *Account, errors *[]error) error { return &configErr{tk, fmt.Sprintf("Expected a parseable size for %q, got %v", mk, mv)} } jsLimits.MaxAckPending = int(vv) - case "nrg_in_account": - vv, ok := mv.(bool) + case "cluster_traffic": + vv, ok := mv.(string) if !ok { - return &configErr{tk, fmt.Sprintf("Expected a boolean for %q, got %v", mk, mv)} + return &configErr{tk, fmt.Sprintf("Expected either 'system' or 'account' string value for %q, got %v", mk, mv)} + } + switch strings.ToLower(vv) { + case "system": + acc.js.accountNRG.Store(false) + case "account": + acc.js.accountNRG.Store(true) + default: + return &configErr{tk, fmt.Sprintf("Expected either 'system' or 'account' string value for %q, got %v", mk, mv)} } - acc.js.accountNRG.Store(vv) default: if !tk.IsUsedVariable() { err := &unknownConfigFieldErr{