SubscriptionState¶
Preferred Read Replica¶
preferredReadReplica¶
Optional<Integer> preferredReadReplica(
TopicPartition tp,
long timeMs)
preferredReadReplica
looks up the state of the given TopicPartition
and, if found, requests it for the preferredReadReplica. Otherwise, preferredReadReplica
returns an undefined preferred read replica.
preferredReadReplica
is used when:
Fetcher
is requested to selectReadReplica
updatePreferredReadReplica¶
void updatePreferredReadReplica(
TopicPartition tp,
int preferredReadReplicaId,
LongSupplier timeMs)
updatePreferredReadReplica
looks up the state of the given TopicPartition
and requests it to updatePreferredReadReplica.
updatePreferredReadReplica
is used when:
Fetcher
is requested to initializeCompletedFetch
clearPreferredReadReplica¶
Optional<Integer> clearPreferredReadReplica(
TopicPartition tp)
clearPreferredReadReplica
looks up the state of the given TopicPartition
and requests it to clearPreferredReadReplica.
clearPreferredReadReplica
is used when:
Fetcher
is requested to selectReadReplica and initializeCompletedFetch