Package com.azure.messaging.eventhubs
Enum LoadBalancingStrategy
- All Implemented Interfaces:
Serializable
,Comparable<LoadBalancingStrategy>
,java.lang.constant.Constable
The strategy used by event processor for load balancing the partition ownership to distribute the event processing
work with other processor instances.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionThe event processor will use a steady approach to claim ownership of partitions and slowly trend towards a stable state where all active processors will have an even distribution of Event Hub partitions.The event processor will attempt to claim its fair share of partition ownership greedily. -
Method Summary
Modifier and TypeMethodDescriptionstatic LoadBalancingStrategy
Returns the enum constant of this type with the specified name.static LoadBalancingStrategy[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
BALANCED
The event processor will use a steady approach to claim ownership of partitions and slowly trend towards a stable state where all active processors will have an even distribution of Event Hub partitions. This strategy may take longer to settle into a balanced partition distribution among active processor instances. This strategy is geared towards minimizing ownership contention and reducing the need to transfer ownership frequently, especially when multiple instances are initialized together, until a stable state is reached. -
GREEDY
The event processor will attempt to claim its fair share of partition ownership greedily. This enables event processing of all partitions to start/resume quickly when there is an imbalance detected by the processor. This may result in ownership of partitions frequently changing when multiple instances are starting up but will eventually converge to a stable state.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-