Skip to content

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:

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:

clearPreferredReadReplica

Optional<Integer> clearPreferredReadReplica(
  TopicPartition tp)

clearPreferredReadReplica looks up the state of the given TopicPartition and requests it to clearPreferredReadReplica.

clearPreferredReadReplica is used when:

Back to top