codelipenghui commented on issue #6647: URL: https://github.com/apache/pulsar/pull/6647#issuecomment-618110187
> I think it's actually the reverse, the % operation is done for each message instead of for each "key" > I think this only matters if rangeSize is small. With rangeSize = 65K or bigger there's no practical grouping benefit. If rangeSize=4, of course, this approach would be more efficient. Totally agree. > I believe a better approach here, instead of exposing the index internals, would be to just group by consumers instead of key or index. Basically, construct Map<Consumer, List<Entry>> and then dispatch. This would work for any rangeSize. I'll make this change after #6791. If I understand correctly, this also needs to find a consumer for a key right? Can we group the messages by the consumer without getting a consumer from the Map? ---------------------------------------------------------------- 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]
