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 2022/10/31 06:16:53 UTC

[GitHub] [pulsar] Jason918 commented on a diff in pull request #17720: [feature][broker] Support `autoSubscriptionCreation` on topic level

Jason918 commented on code in PR #17720:
URL: https://github.com/apache/pulsar/pull/17720#discussion_r1009061314


##########
pulsar-client-admin-api/src/main/java/org/apache/pulsar/client/admin/TopicPolicies.java:
##########
@@ -1814,4 +1815,102 @@ SchemaCompatibilityStrategy getSchemaCompatibilityStrategy(String topic, boolean
     CompletableFuture<Void> removeEntryFiltersPerTopicAsync(String topic);
 
 
+    /**
+     * Sets the autoSubscriptionCreation policy for a given topic, overriding namespace settings.
+     * <p/>
+     * When autoSubscriptionCreationOverride is enabled, new subscriptions will be created upon connection,
+     * regardless of the namespace level configuration.
+     * <p/>
+     * Request example:
+     *
+     * <pre>
+     * <code>
+     *  {
+     *      "allowAutoSubscriptionCreation" : true
+     *  }
+     * </code>
+     * </pre>
+     *
+     * @param topic
+     *            Topic name
+     * @param autoSubscriptionCreationOverride
+     *            Override policies for auto subscription creation
+     *
+     * @throws PulsarAdminException.NotAuthorizedException
+     *             Don't have admin permission
+     * @throws PulsarAdminException.NotFoundException
+     *             Topic does not exist
+     * @throws PulsarAdminException
+     *             Unexpected error
+     */
+    void setAutoSubscriptionCreation(

Review Comment:
   I don't get the point of using `AutoSubscriptionCreationOverride` in the API. Isn't a `Boolean` more simple?



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