public enum MessageRoutingMode extends Enum<MessageRoutingMode>
MessageBuilder.setKey(String)
on a particular
message.Enum Constant and Description |
---|
CustomPartition
Use custom message router implementation that will be called to determine the partition for a particular message.
|
RoundRobinPartition
If no key is provided, the producer will publish messages across all partitions in round-robin fashion to achieve maximum throughput.
|
SinglePartition
If no key is provided, The partitioned producer will randomly pick one single partition and publish all the messages into that partition.
|
Modifier and Type | Method and Description |
---|---|
static MessageRoutingMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static MessageRoutingMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final MessageRoutingMode SinglePartition
public static final MessageRoutingMode RoundRobinPartition
public static final MessageRoutingMode CustomPartition
public static MessageRoutingMode[] values()
for (MessageRoutingMode c : MessageRoutingMode.values()) System.out.println(c);
public static MessageRoutingMode 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