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/06/21 20:19:04 UTC

[GitHub] [pulsar] klevy-toast opened a new issue #11008: Java client: consumer listener does not respect receiver queue size

klevy-toast opened a new issue #11008:
URL: https://github.com/apache/pulsar/issues/11008


   **Describe the bug**
   When using a consumer on a shared subscription with `messageListener`, messages are queued up to the consumer beyond what the `receiverQueueSize` should allow. As a result, a 2nd consumer on the shared subscription that comes online afterwards will not receive messages, even if the 1st consumer is very slow in processing.
   
   **To Reproduce**
   1. Create a consumer with Shared subscription, receiverQueueSize > 0, with a messageListener that takes time.
   2. Produce messages to the topic and observe a backlog build on the topic
   3. Connect a 2nd consumer to the same subscription with the same settings
   4. The 2nd consumer will not process any messages
   
   This test demonstrates the issue: https://gist.github.com/klevy-toast/dc8614978945465786cd385fed324a30
   This test demonstrates how the consumer's permits are properly utilized when using `consumer.receive`, instead of `messageListener` - both consumers process messages correctly.
   
   **Expected behavior**
   A consumer using a message listener should not fetch more messages than is configured in `receiverQueueSize`.
   
   **Desktop (please complete the following information):**
    - OS: macOS
   


-- 
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



[GitHub] [pulsar] Technoboy- commented on issue #11008: Java client: consumer listener does not respect receiver queue size

Posted by GitBox <gi...@apache.org>.
Technoboy- commented on issue #11008:
URL: https://github.com/apache/pulsar/issues/11008#issuecomment-885990153


   I will try to fix it.


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui closed issue #11008: Java client: consumer listener does not respect receiver queue size

Posted by GitBox <gi...@apache.org>.
codelipenghui closed issue #11008:
URL: https://github.com/apache/pulsar/issues/11008


   


-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org