接口 MessageRouter
-
-
方法概要
所有方法 实例方法 默认方法 已过时的方法 修饰符和类型 方法 说明 default int
choosePartition(Message<?> msg)
已过时。since 1.22.0.default int
choosePartition(Message<?> msg, TopicMetadata metadata)
Choose a partition based on msg and the topic metadata.
-
-
-
方法详细资料
-
choosePartition
@Deprecated default int choosePartition(Message<?> msg)
已过时。since 1.22.0. Please usechoosePartition(Message, TopicMetadata)
instead.- 参数:
msg
- Message object- 返回:
- The index of the partition to use for the message
-
choosePartition
default int choosePartition(Message<?> msg, TopicMetadata metadata)
Choose a partition based on msg and the topic metadata.- 参数:
msg
- message to routemetadata
- topic metadata- 返回:
- the partition to route the message.
- 从以下版本开始:
- 1.22.0
-
-