Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ADDED] consumer add when prompting for subject filter(s) can parse the user input as a comma or space separated list of subject filters #883

Merged
merged 2 commits into from
Sep 28, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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