You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2021/10/09 13:29:59 UTC
[GitHub] [pulsar] BewareMyPower commented on a change in pull request #12302: reset-cursor support earliest or latest
BewareMyPower commented on a change in pull request #12302:
URL: https://github.com/apache/pulsar/pull/12302#discussion_r725488048
##########
File path: pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdTopics.java
##########
@@ -778,6 +778,14 @@ void run() throws PulsarAdminException {
description = "Exclude the reset position, start consume messages from the next position.", required = false)
private boolean excludeResetPosition = false;
+ @Parameter(names = { "-ea", "--earliest" },
+ description = "reset back to earliest messageId", required = false)
+ private boolean resetToEarliest = false;
+
+ @Parameter(names = { "-la", "--latest" },
+ description = "reset back to latest messageId", required = false)
+ private boolean resetToLatest = false;
Review comment:
I'd like to use a `String` parameter (like `position`) that only supports "earliest" or "latest". Like what Kafka's CLI tool does:
```bash
--offset <String: consume offset> The offset id to consume from (a non-
negative number), or 'earliest'
which means from beginning, or
'latest' which means from end
(default: latest)
```
--
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: commits-unsubscribe@pulsar.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org