nats-io / natscli

The NATS Command Line Interface
Apache License 2.0
498 stars 99 forks source link

Enable inactive-threshold flag while editing consumer #1038

Closed yeqown closed 6 months ago

yeqown commented 6 months ago

Proposed change

--inactive-threshold=THRESHOLD flag invisible for nats con edit -h, therefore it's not available for the edit subcommand. Refer to the https://docs.nats.io/nats-concepts/jetstream/consumers#general, it marks InactiveThreshold editable, natscli should provide the ability to edit consumer's InactiveThreshold too.

Use case

Can edit the inactive-threshold attributes by natscli easily rather than coding with client SDK.

Contribution

Yes

ripienaar commented 6 months ago

Easy fix, just move this line out of the edit check, in case you wanted to do a PR?

https://github.com/nats-io/natscli/blob/1abdc479c4723cec02cdbe7c25985991aa67d7fb/cli/consumer_command.go#L143

yeqown commented 6 months ago

@ripienaar yup, I'd like to open A PR for this, and I've tested locally.