public static class KeySharedPolicy.KeySharedPolicySticky extends KeySharedPolicy
Total hash range size is 65536, using the sticky hash range policy should ensure that the provided ranges by all consumers can cover the total hash range [0, 65535]. If not, while broker dispatcher can't find the consumer for message, the cursor will rewind.
KeySharedPolicy.KeySharedPolicyAutoSplit, KeySharedPolicy.KeySharedPolicySticky| Modifier and Type | Field and Description |
|---|---|
protected List<Range> |
ranges |
allowOutOfOrderDelivery, DEFAULT_HASH_RANGE_SIZE, keySharedMode| Modifier and Type | Method and Description |
|---|---|
List<Range> |
getRanges() |
KeySharedPolicy.KeySharedPolicySticky |
ranges(List<Range> ranges) |
KeySharedPolicy.KeySharedPolicySticky |
ranges(Range... ranges) |
void |
validate() |
autoSplitHashRange, getHashRangeTotal, getKeySharedMode, isAllowOutOfOrderDelivery, setAllowOutOfOrderDelivery, stickyHashRangepublic KeySharedPolicy.KeySharedPolicySticky ranges(List<Range> ranges)
public KeySharedPolicy.KeySharedPolicySticky ranges(Range... ranges)
public void validate()
validate in class KeySharedPolicyCopyright © 2017–2021 Apache Software Foundation. All rights reserved.