codelipenghui commented on issue #7280:
URL: https://github.com/apache/pulsar/issues/7280#issuecomment-791400497


   @merlimat How about syncing the backlog between the broker and client 
periodically. Treat topics with more backlogs as a high priority. Since we 
don't know if a topic will there be any messages written, to avoid a consumer 
block to one topic(no more data are written), we can reset the permits in a 
sync cycle if there are topics that have more backlog, looks like 
   
   1. reset permits to 0 
   2. re-order the consumers 
   3. trigger read data from the high priority consumer
   
   Users can achieve the desired purpose by setting the frequency of 
synchronization.
   
   We can optimize the sync mechanism, e.g. carry the backlog when dispatching 
messages. Only if the message is not dispatched for a period of time, perform a 
separate sync command.


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


Reply via email to