public interface MessageRouter extends Serializable
Modifier and Type | Method and Description |
---|---|
default int |
choosePartition(Message<?> msg)
Deprecated.
since 1.22.0. Please use
choosePartition(Message, TopicMetadata) instead. |
default int |
choosePartition(Message<?> msg,
TopicMetadata metadata)
Choose a partition based on msg and the topic metadata.
|
@Deprecated default int choosePartition(Message<?> msg)
choosePartition(Message, TopicMetadata)
instead.msg
- Message objectdefault int choosePartition(Message<?> msg, TopicMetadata metadata)
msg
- message to routemetadata
- topic metadataCopyright © 2017–2020 Apache Software Foundation. All rights reserved.