class documentation

Consumer key shared policy is used to configure the consumer behaviour when the ConsumerType is KeyShared.

Method __init__ Wrapper KeySharedPolicy.
Method policy Returns the actual KeySharedPolicy.
Property allow_out_of_order_delivery Returns whether out of order delivery is enabled
Property key_shared_mode Returns the key shared mode
Property sticky_ranges Returns the actual sticky ranges
Instance Variable _policy Undocumented
def __init__(self, key_shared_mode: KeySharedMode = KeySharedMode.AutoSplit, allow_out_of_order_delivery: bool = False, sticky_ranges: Optional[List[Tuple[int, int]]] = None): (source)

Wrapper KeySharedPolicy.

Parameters
key_shared_mode:KeySharedMode, optionalSet the key shared mode. eg: KeySharedMode.Sticky or KeysharedMode.AutoSplit
allow_out_of_order_delivery:bool, optional

Set whether to allow for out of order delivery If it is enabled, it relaxes the ordering requirement and allows the broker to send out-of-order messages in case of failures. This makes it faster for new consumers to join without being stalled by an existing slow consumer.

If this is True, a single consumer still receives all keys, but they may come in different orders.

sticky_ranges:List[Tuple[int, int]], optionalSet the ranges used with sticky mode. The integers can be from 0 to 2^16 (0 <= val < 65,536)
def policy(self): (source)

Returns the actual KeySharedPolicy.

@property
allow_out_of_order_delivery: bool = (source)

Returns whether out of order delivery is enabled

Returns the key shared mode

@property
sticky_ranges: List[Tuple[int, int]] = (source)

Returns the actual sticky ranges

Undocumented