youzipi edited a comment on issue #6965:
URL: https://github.com/apache/pulsar/issues/6965#issuecomment-629982830


   I checked the UT 
   `org.apache.pulsar.client.api.SimpleProducerConsumerTest#testPauseAndResume`
   
   ```java
   log.info("Giving message listener an opportunity to receive messages while 
paused");
   Thread.sleep(2000);     // hopefully this is long enough
   assertEquals(received.intValue(), receiverQueueSize, "Consumer received 
messages while paused");
   ```
   consumer can still receive msg until receiverQueueSize is used up.
   that's where the `might` in method comment come from, it kind of confuse 
me...
   
   
   how can i stop receive msg immediately?
   consumer has a close() method,but i did not find a `consumer.subscribe()` 
method.
   is there any way to `stop consumer receive msg immediately`?
   
   


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


Reply via email to