gaoran10 commented on a change in pull request #14729:
URL: https://github.com/apache/pulsar/pull/14729#discussion_r829281990



##########
File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ReaderBuilderImpl.java
##########
@@ -229,4 +230,26 @@ private ReaderBuilderImpl(PulsarClientImpl client, 
ReaderConfigurationData<T> co
         conf.setPoolMessages(poolMessages);
         return this;
     }
+
+    @Override
+    public ReaderBuilder<T> autoUpdatePartitions(boolean autoUpdate) {
+        this.conf.setAutoUpdatePartitions(autoUpdate);
+        return this;
+    }
+
+    @Override
+    public ReaderBuilder<T> autoUpdatePartitionsInterval(int interval, 
TimeUnit unit) {
+        checkArgument(interval > 0, "interval needs to be > 0");

Review comment:
       Because the auto-update partition check timer task is in seconds level, 
I adjust the check to make sure the interval should be >= 1 second.




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