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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to