class documentation
class ConsumerKeySharedPolicy: (source)
Constructor: ConsumerKeySharedPolicy(key_shared_mode, allow_out_of_order_delivery, sticky_ranges)
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 |
Returns whether out of order delivery is enabled |
Property | key |
Returns the key shared mode |
Property | sticky |
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 | |
keyKeySharedMode , optional | Set the key shared mode. eg: KeySharedMode.Sticky or KeysharedMode.AutoSplit |
allowbool , 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. |
stickyList[Tuple[int , int]] , optional | Set the ranges used with sticky mode. The integers can be from 0 to 2^16 (0 <= val < 65,536) |