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 2021/05/12 09:10:21 UTC

[GitHub] [pulsar] linlinnn commented on a change in pull request #10544: [plusar-10479] Resolved Allow Java client to create consumer with rec…

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



##########
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:
       Thanks for your contribution.
   But I think this is not a right way to fix this.




-- 
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:
users@infra.apache.org