com.taobao.metamorphosis.client.producer
接口 PartitionSelector

所有已知实现类:
AbstractPartitionSelector, ConfigPartitionsSupport, OrderedMessagePartitionSelector, RandomPartitionSelector, RoundRobinPartitionSelector

public interface PartitionSelector

分区选择器

作者:
boyan

方法摘要
 Partition getPartition(String topic, List<Partition> partitions, Message message)
          根据topic、message从partitions列表中选择分区
 

方法详细信息

getPartition

Partition getPartition(String topic,
                       List<Partition> partitions,
                       Message message)
                       throws MetaClientException
根据topic、message从partitions列表中选择分区

参数:
topic - topic
partitions - 分区列表
message - 消息
返回:
抛出:
MetaClientException - 此方法抛出的任何异常都应当包装为MetaClientException


Copyright © 2010–2013. All rights reserved.