@PublicEvolving public enum TopicRoutingMode extends Enum<TopicRoutingMode> implements DescribedEnum
Enum Constant and Description |
---|
CUSTOM
Use custom topic router implementation that will be called to determine the partition for a
particular message.
|
MESSAGE_KEY_HASH
If no key is provided, The partitioned producer will randomly pick one single topic partition
and publish all the messages into that partition.
|
ROUND_ROBIN
The producer will publish messages across all partitions in a round-robin fashion to achieve
maximum throughput.
|
Modifier and Type | Method and Description |
---|---|
InlineElement |
getDescription()
Returns the description for the enum constant.
|
String |
toString() |
static TopicRoutingMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static TopicRoutingMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final TopicRoutingMode ROUND_ROBIN
public static final TopicRoutingMode MESSAGE_KEY_HASH
public static final TopicRoutingMode CUSTOM
public static TopicRoutingMode[] values()
for (TopicRoutingMode c : TopicRoutingMode.values()) System.out.println(c);
public static TopicRoutingMode valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null@Internal public InlineElement getDescription()
DescribedEnum
If you want to include links or code blocks, use TextElement.wrap(InlineElement...)
to wrap multiple inline elements into a single one.
getDescription
in interface DescribedEnum
public String toString()
toString
in class Enum<TopicRoutingMode>
Copyright © 2014–2023 The Apache Software Foundation. All rights reserved.