merlimat commented on a change in pull request #2961: Added pause and resume to 
Java client Consumer
URL: https://github.com/apache/pulsar/pull/2961#discussion_r232025883
 
 

 ##########
 File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/MultiTopicsConsumerImpl.java
 ##########
 @@ -853,5 +853,15 @@ private void handleSubscribeOneTopicError(String 
topicName, Throwable error, Com
         return consumers.values().stream().collect(Collectors.toList());
     }
 
+    @Override
+    public void pause() {
+        for (Map.Entry<String, ConsumerImpl<T>> e : consumers.entrySet()) 
e.getValue().pause();
+    }
+
+    @Override
+    public void resume() {
+        for (Map.Entry<String, ConsumerImpl<T>> e : consumers.entrySet()) 
e.getValue().resume();
 
 Review comment:
   ```suggestion
           consumers.forEach((name, consumer) -> consumer.resume());
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to