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 |
DEFAULT_HASH_RANGE_SIZE, keySharedMode
Modifier and Type | Method and Description |
---|---|
List<Range> |
getRanges() |
KeySharedPolicy.KeySharedPolicySticky |
ranges(Range... ranges) |
void |
validate() |
autoSplitHashRange, getHashRangeTotal, getKeySharedMode, stickyHashRange
public KeySharedPolicy.KeySharedPolicySticky ranges(Range... ranges)
public void validate()
validate
in class KeySharedPolicy
Copyright © 2017–2020 Apache Software Foundation. All rights reserved.