GitHub user codelipenghui added a comment to the discussion: Support zero queue 
consumer for partitioned topic.

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

GitHub link: 
https://github.com/apache/pulsar/discussions/18846#discussioncomment-4351885

----
This is an automatically sent email for dev@pulsar.apache.org.
To unsubscribe, please send an email to: dev-unsubscr...@pulsar.apache.org

Reply via email to