...
Fetching from a non-leader replica is an opt-in feature. We propose to add a second configuration "replica.selection.policy" to indicate whether the "consumer should take the preferred replica selected by the broker or to use the leader as usual.
Configuration Name | Valid Values | Default Value |
---|---|---|
rack.id | <nullable string> | null |
replica.selection.policy | leader, preferred | leader |
Broker API
We will expose a new plugin interface configured through the "replica.selector.class" configuration that allows users to provide custom logic to determine the preferred replica to fetch from.
Configuration Name | Valid Values | Default Value |
---|---|---|
replica.selector.class | class name of ReplicaSelector implementation | null |
The ReplicaSelector interface is provided below:
...