Skip to content

Commit

Permalink
[ADDED] consumer add when prompting for subject filter(s) can parse…
Browse files Browse the repository at this point in the history
… the user input as a comma or space separated list of subject filters. (#883)

Signed-off-by: Jean-Noël Moyne <[email protected]>
  • Loading branch information
jnmoyne authored and ripienaar committed Oct 3, 2023
1 parent c19074d commit 7a0805b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cli/consumer_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -1128,12 +1128,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 7a0805b

Please sign in to comment.