massakam commented on code in PR #15657:
URL: https://github.com/apache/pulsar/pull/15657#discussion_r882269743
##########
pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdNamespaces.java:
##########
@@ -386,14 +386,27 @@ private class SetMessageTTL extends CliCommand {
@Parameter(description = "tenant/namespace", required = true)
private java.util.List<String> params;
- @Parameter(names = { "--messageTTL", "-ttl" }, description = "Message
TTL in seconds. "
- + "When the value is set to `0`, TTL is disabled.", required =
true)
- private int messageTTL;
+ @Parameter(names = { "--messageTTL", "-ttl" },
+ description = "Message TTL in seconds (or minutes, hours,
days, weeks eg: 100m, 3h, 2d, 5w). "
+ + "When the value is set to `0`, TTL is disabled.",
required = true)
+ private String messageTTLStr;
Review Comment:
No, it's compatible. If the option does not contain a unit, its value is
treated as a number of seconds.
https://github.com/apache/pulsar/blob/34673dd3f04519f6ba424df396af11ab5c4f2ebd/pulsar-common/src/main/java/org/apache/pulsar/common/util/RelativeTimeUtil.java#L31-L67
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]