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.
for example, you catch the case not connecting, and throw exception indicate
"Can't use receive with timeout, if the queue size is 0"
--
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]