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 2020/05/18 06:53:37 UTC

[GitHub] [pulsar] youzipi commented on issue #6965: Consumer pause do not work

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