natscli
natscli copied to clipboard
Ability to set infinite timeout
Would be nice if there was a way to set infinite timeout, --timeout=0 exits immediately and --timeout=-1 is an invalid option (similar for --count).
This would be useful for a couple of reasons:
- Allow simulation similar to an infinite
while()loop - Allow better testing of retries, for example one nats instance with
--no-ackand then waiting for retry timeout
Yes, arguably you could set a long timeout, but something like -1 = infinite would be "cleaner" and more deterministic (and obvious when writing docs).
Suggest you just set a big one. Infinite timeout is usually a bad idea and will lead to issues.