@InterfaceAudience.Public @InterfaceStability.Stable public enum SubscriptionType extends Enum<SubscriptionType>
| Enum Constant and Description |
|---|
Exclusive
There can be only 1 consumer on the same topic with the same subscription name.
|
Failover
Multiple consumer will be able to use the same subscription name but only 1 consumer will receive the messages.
|
Key_Shared
Multiple consumer will be able to use the same subscription and all messages with the same key
will be dispatched to only one consumer.
|
Shared
Multiple consumer will be able to use the same subscription name and the messages will be dispatched
according to a round-robin rotation between the connected consumers.
|
| Modifier and Type | Method and Description |
|---|---|
static SubscriptionType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SubscriptionType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SubscriptionType Exclusive
public static final SubscriptionType Shared
In this mode, the consumption order is not guaranteed.
public static final SubscriptionType Failover
In failover mode, the consumption ordering is guaranteed.
In case of partitioned topics, the ordering is guaranteed on a per-partition basis. The partitions assignments will be split across the available consumers. On each partition, at most one consumer will be active at a given point in time.
public static final SubscriptionType Key_Shared
Use ordering_key to overwrite the message key for message ordering.
public static SubscriptionType[] values()
for (SubscriptionType c : SubscriptionType.values()) System.out.println(c);
public static SubscriptionType 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 © 2017–2021 Apache Software Foundation. All rights reserved.