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/10 00:22:31 UTC

[GitHub] [pulsar] codelipenghui commented on issue #10523: Key_Shared subscription is not evenly distributed

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:
users@infra.apache.org