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


   @mrkingfoxx The messages for the Key_Shared subscription are dispatched by 
the hash of the key, by default we have [0,65535] hash slots and a consumer 
receives messages from a fixed hash range. So it's can't perform the evenly 
distribution.  You can try to use the consistent hash for the key_shared 
subscription
   
   ```
   # On KeyShared subscriptions, with default AUTO_SPLIT mode, use splitting 
ranges or
   # consistent hashing to reassign keys to new consumers
   subscriptionKeySharedUseConsistentHashing=false
   
   # On KeyShared subscriptions, number of points in the consistent-hashing 
ring.
   # The higher the number, the more equal the assignment of keys to consumers
   subscriptionKeySharedConsistentHashingReplicaPoints=100
   ```
   
   And you can increase the `ReplicaPoints` for getting a more evenly 
distribution.


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