Skip to content

Commit

Permalink
Merge branch 'main' into early_filter_connz
Browse files Browse the repository at this point in the history
  • Loading branch information
ripienaar authored Sep 29, 2023
2 parents 1033cad + a278fce commit 68bfc2e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions cli/consumer_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -375,8 +375,10 @@ func (c *consumerCmd) editAction(pc *fisk.ParseContext) error {

if len(c.filterSubjects) == 1 {
ncfg.FilterSubject = c.filterSubjects[0]
ncfg.FilterSubjects = nil
} else if len(c.filterSubjects) > 1 {
ncfg.FilterSubjects = c.filterSubjects
ncfg.FilterSubject = ""
}

if c.replicas > 0 {
Expand Down Expand Up @@ -1128,12 +1130,12 @@ func (c *consumerCmd) prepareConfig(pc *fisk.ParseContext) (cfg *api.ConsumerCon
case len(c.filterSubjects) == 0 && !c.acceptDefaults:
sub := ""
err = askOne(&survey.Input{
Message: "Filter Stream by subject (blank for all)",
Message: "Filter Stream by subjects (blank for all)",
Default: "",
Help: "Stream can consume more than one subject - or a wildcard - this allows you to filter out just a single subject from all the ones entering the Stream for delivery to the Consumer. Settable using --filter",
Help: "Consumers can filter messages from the stream, this is a space or comma separated list that can include wildcards. Settable using --filter",
}, &sub)
fisk.FatalIfError(err, "could not ask for filtering subject")
c.filterSubjects = []string{sub}
c.filterSubjects = splitString(sub)
}

switch {
Expand Down

0 comments on commit 68bfc2e

Please sign in to comment.