Search before asking
Motivation
If I accidentally type a bad option when running the pulsar-perf command, I get an unhelpful error message.
> bin/pulsar-perf produce --foo mytopic
The size of topics list should be equal to --num-topic
Usage: pulsar-perf produce [options] persistent://prop/ns/my-topic
Options:
-am, --access-mode
Producer access mode
Default: Shared
...
I would expect pulsar-perf to provide an error that points out the bad option.
unrecognized option `--foo`
Solution
pulsar-perf should be able to determine if the user typed an option that is not valid.
I would think this would be handled automatically by the CLI library (jcommander in this case), but it seems to be interpreting unrecognized options as names of topics. If the CLI library can't handle this case correctly, pulsar should either switch to a different library, or add some additional error checking to see if an invalid option has been entered.
Alternatives
No response
Anything else?
No response
Are you willing to submit a PR?
Search before asking
Motivation
If I accidentally type a bad option when running the pulsar-perf command, I get an unhelpful error message.
I would expect pulsar-perf to provide an error that points out the bad option.
Solution
pulsar-perf should be able to determine if the user typed an option that is not valid.
I would think this would be handled automatically by the CLI library (jcommander in this case), but it seems to be interpreting unrecognized options as names of topics. If the CLI library can't handle this case correctly, pulsar should either switch to a different library, or add some additional error checking to see if an invalid option has been entered.
Alternatives
No response
Anything else?
No response
Are you willing to submit a PR?