[
https://issues.apache.org/jira/browse/ROCKETMQ-67?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15904341#comment-15904341
]
ASF GitHub Bot commented on ROCKETMQ-67:
----------------------------------------
Github user Jaskey commented on the issue:
https://github.com/apache/incubator-rocketmq/pull/67
@shroman
This is feature to give choice to users who cares more about latency
stabilization and messages duplication.
As you know, the default `AllocateMessageQueueStrategy` is averaging
strategy which allocate queue to consumer as evenly as possible. But as you
states whenever queues numbers or consumer numbers changed, say a new consumer
starts or an old consumer shutdown, a rehashing will be triggered and almost
all consumer suffered from this and they rebalance to drop old queues and get
new queue.
This will cause
1. message latency from producer to consumer increases at that moment
2. messages will be duplicated significantly since the offset may not be
persisted to broker and that queue is assigned to another consumer to pull
messages from.
This is especially significant when they have tens of consumer instances
and scale-up or deployment is often.
Consistent Hash strategy to allocate queue is a good choice for these users.
> Consistent Hash allocate strategy support
> -----------------------------------------
>
> Key: ROCKETMQ-67
> URL: https://issues.apache.org/jira/browse/ROCKETMQ-67
> Project: Apache RocketMQ
> Issue Type: New Feature
> Components: rocketmq-client
> Reporter: Jaskey Lam
> Assignee: Jaskey Lam
> Fix For: 4.1.0-incubating
>
>
> For now, the average allocate strategy is very sensitive when clients
> register and unrigister.
> A Consistent Hash allocate strategy is valueable for the developer who cares
> more about stabilization than averaging.
> This option should be supported. And averaging should be meet as much as
> possible.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)