complone commented on a change in pull request #10544:
URL: https://github.com/apache/pulsar/pull/10544#discussion_r631444735



##########
File path: 
pulsar-client/src/main/java/org/apache/pulsar/client/impl/ConsumerBase.java
##########
@@ -172,8 +172,17 @@ protected ConsumerBase(PulsarClientImpl client, String 
topic, ConsumerConfigurat
     @Override
     public Message<T> receive(int timeout, TimeUnit unit) throws 
PulsarClientException {
         if (conf.getReceiverQueueSize() == 0) {
-            throw new PulsarClientException.InvalidConfigurationException(
-                    "Can't use receive with timeout, if the queue size is 0");
+
+            if(!(getState() == State.Connecting)){

Review comment:
       I think this way. The meaning of this state is whether the connection 
between each consumer and the topic is alive. If the connection is closed or 
interrupted during the process of receiving the message, the downstream 
consumer should be notified in time




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


Reply via email to