You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/04/13 16:12:51 UTC

[GitHub] [pulsar] michaeljmarshall commented on a diff in pull request #15144: [fix] [client-consumer] NotifyPendingReceivedCallback when zeroConsumerImpl received batch message firstly , then close consumer.

michaeljmarshall commented on code in PR #15144:
URL: https://github.com/apache/pulsar/pull/15144#discussion_r849652900


##########
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ZeroQueueConsumerImpl.java:
##########
@@ -182,14 +182,20 @@ void receiveIndividualMessagesFromBatch(BrokerEntryMetadata brokerEntryMetadata,
         log.warn(
                 "Closing consumer [{}]-[{}] due to unsupported received batch-message with zero receiver queue size",
                 subscription, consumerName);
-        // close connection
-        closeAsync().handle((ok, e) -> {

Review Comment:
   The `closeAsync()` method already fails all messages in the `pendingReceives` queue. As such, the callback on the `closeAsync()` future hasn't ever had any affect. I think it is a good catch to re-order these tasks. However, I wonder if there are any chances for race conditions because we're delaying putting the consumer into a `Closing` state.



-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org