codelipenghui commented on a change in pull request #4621: [PIP-38] Support 
batch receive in java client.
URL: https://github.com/apache/pulsar/pull/4621#discussion_r312740338
 
 

 ##########
 File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerImpl.java
 ##########
 @@ -369,6 +370,52 @@ public UnAckedMessageTracker getUnAckedMessageTracker() {
         }
     }
 
+    @Override
+    protected Messages<T> internalBatchReceive() throws PulsarClientException {
+        try {
+            return internalBatchReceiveAsync().get();
+        } catch (InterruptedException | ExecutionException e) {
+            State state = getState();
+            if (state != State.Closing && state != State.Closed) {
+                stats.incrementNumReceiveFailed();
 
 Review comment:
   Yes, i will add metrics for batch receive.

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to