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


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/PatternMultiTopicsConsumerImpl.java:
##########
@@ -50,9 +51,12 @@ public class PatternMultiTopicsConsumerImpl<T> extends 
MultiTopicsConsumerImpl<T
     private final Pattern topicsPattern;
     private final TopicsChangedListener topicsChangeListener;
     private final Mode subscriptionMode;
-    private final CompletableFuture<TopicListWatcher> watcherFuture;
+    private final CompletableFuture<TopicListWatcher> watcherFuture = new 
CompletableFuture<>();
     protected NamespaceName namespaceName;
     private volatile Timeout recheckPatternTimeout = null;
+    private volatile AtomicReference<Timeout> retryRecheckPatternTask = new 
AtomicReference<>();

Review Comment:
   `recheckPatternTask` is better



##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/PatternMultiTopicsConsumerImpl.java:
##########
@@ -50,9 +51,12 @@ public class PatternMultiTopicsConsumerImpl<T> extends 
MultiTopicsConsumerImpl<T
     private final Pattern topicsPattern;
     private final TopicsChangedListener topicsChangeListener;
     private final Mode subscriptionMode;
-    private final CompletableFuture<TopicListWatcher> watcherFuture;
+    private final CompletableFuture<TopicListWatcher> watcherFuture = new 
CompletableFuture<>();
     protected NamespaceName namespaceName;
     private volatile Timeout recheckPatternTimeout = null;
+    private volatile AtomicReference<Timeout> retryRecheckPatternTask = new 
AtomicReference<>();
+    private final Backoff retryRecheckPatternTaskBackoff = new 
BackoffBuilder().setInitialTime(5, TimeUnit.SECONDS)

Review Comment:
   `recheckPatternTaskBackoff`



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