You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by "Technoboy- (via GitHub)" <gi...@apache.org> on 2024/01/10 14:52:27 UTC

Re: [PR] [improve] [broker] PIP-299-part-4: Add topic-level policy: dispatcherPauseOnAckStatePersistent [pulsar]

Technoboy- commented on code in PR #21874:
URL: https://github.com/apache/pulsar/pull/21874#discussion_r1447493778


##########
pulsar-client-tools/src/main/java/org/apache/pulsar/admin/cli/CmdTopicPolicies.java:
##########
@@ -1931,6 +1938,60 @@ void run() throws PulsarAdminException {
         }
     }
 
+    @Parameters(commandDescription = "Enable autoSubscriptionCreation for a topic")
+    private class SetDispatcherPauseOnAckStatePersistent extends CliCommand {
+        @Parameter(description = "persistent://tenant/namespace/topic", required = true)
+        private java.util.List<String> params;
+
+        @Parameter(names = {"--enable", "-e"}, description = "Enable allowAutoSubscriptionCreation on topic")
+        private boolean enable = false;
+
+        @Parameter(names = { "--global", "-g" }, description = "Whether to set this policy globally. "
+                + "If set to true, the policy will be replicate to other clusters asynchronously")
+        private boolean isGlobal = false;
+
+        @Override
+        void run() throws PulsarAdminException {
+            String persistentTopic = validatePersistentTopic(params);
+            getTopicPolicies(isGlobal).setDispatcherPauseOnAckStatePersistent(persistentTopic);
+        }
+    }
+
+    @Parameters(commandDescription = "Get the autoSubscriptionCreation for a topic")

Review Comment:
   `commandDescription` need to update



-- 
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