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


##########
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 see, it's introduced years ago in 
https://github.com/apache/pulsar/pull/6637.
   It's too complex to expose this to admin API, but it's not easy to change it 
now.
   
   Anyway, it's ok keep the consistency to me.



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

Reply via email to