@PublicEvolving public static enum RangeGenerator.KeySharedMode extends Enum<RangeGenerator.KeySharedMode>
JOIN
mode which
will subscribe all the range in only one reader. Otherwise, when the ranges can join into a
full Pulsar key hash range (0 ~ 65535) you should use SPLIT
for sharing
the splits among all the backend readers.
In the SPLIT
mode. The topic will be subscribed by multiple readers.
But Pulsar has one limit in this situation. That is if a Message can't find the corresponding
reader by the key hash range. No messages will be delivered to the current readers, until
there is a reader which can subscribe to such messages.
Enum Constant and Description |
---|
JOIN
Assign all the topic ranges to only one reader instance.
|
SPLIT
The topic ranges that the
RangeGenerator generated will be split among the
readers. |
Modifier and Type | Method and Description |
---|---|
static RangeGenerator.KeySharedMode |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static RangeGenerator.KeySharedMode[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final RangeGenerator.KeySharedMode SPLIT
RangeGenerator
generated will be split among the
readers.public static final RangeGenerator.KeySharedMode JOIN
public static RangeGenerator.KeySharedMode[] values()
for (RangeGenerator.KeySharedMode c : RangeGenerator.KeySharedMode.values()) System.out.println(c);
public static RangeGenerator.KeySharedMode 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 nullCopyright © 2014–2022 The Apache Software Foundation. All rights reserved.