com.alibaba.rocketmq.client.consumer.rebalance
类 AllocateMessageQueueByConfig
java.lang.Object
com.alibaba.rocketmq.client.consumer.rebalance.AllocateMessageQueueByConfig
- 所有已实现的接口:
- AllocateMessageQueueStrategy
public class AllocateMessageQueueByConfig
- extends Object
- implements AllocateMessageQueueStrategy
按照配置来分配队列,建议应用使用Spring来初始化
- 从以下版本开始:
- 2013-7-24
- 作者:
- shijia.wxr
| 从类 java.lang.Object 继承的方法 |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AllocateMessageQueueByConfig
public AllocateMessageQueueByConfig()
allocate
public List<MessageQueue> allocate(String currentCID,
List<MessageQueue> mqAll,
List<String> cidAll)
- 从接口
AllocateMessageQueueStrategy 复制的描述
- 给当前的ConsumerId分配队列
- 指定者:
- 接口
AllocateMessageQueueStrategy 中的 allocate
- 参数:
currentCID - 当前ConsumerIdmqAll - 当前Topic的所有队列集合,无重复数据,且有序cidAll - 当前订阅组的所有Consumer集合,无重复数据,且有序
- 返回:
- 分配结果,无重复数据
getMessageQueueList
public List<MessageQueue> getMessageQueueList()
setMessageQueueList
public void setMessageQueueList(List<MessageQueue> messageQueueList)
Copyright © 2012-2014. All Rights Reserved.