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 20:32:09 UTC

[GitHub] [pulsar] yangou edited a comment on issue #10524: > I tested `pulsar 2.7.1 docker` on my local machine. Also java client version is `2.7.1`

yangou edited a comment on issue #10524:
URL: https://github.com/apache/pulsar/issues/10524#issuecomment-840077113


   Have you tune the receiver queue size.  When consumer polls the messages from pulsar, if the requested messages is greater than total number of messages, pulsar won't be able to evenly distribute the messages. 
   
   Pulsar uses poll model, not push model.  If you want consumers to be evenly distributed, try setting the receiver queue size to 1.
   
   https://pulsar.apache.org/docs/en/cookbooks-message-queue/#client-configuration-changes
   
   ```If you'd like to have tight control over message dispatching across consumers, set the consumers' receiver queue size very low (potentially even to 0 if necessary). Each Pulsar consumer has a receiver queue that determines how many messages the consumer will attempt to fetch at a time. A receiver queue of 1000 (the default), for example, means that the consumer will attempt to process 1000 messages from the topic's backlog upon connection. Setting the receiver queue to zero essentially means ensuring that each consumer is only doing one thing at a time.```


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