...
Code Block |
---|
OffsetsForLeaderEpochRequest => [Topic] ReplicaId => INT32 // New (-1 means consumer) Topic => TopicName [Partition] TopicName => STRING Partition => PartitionId CurrentLeaderEpoch LeaderEpoch PartitionId => INT32 CurrentLeaderEpoch => INT32 LeaderEpoch => INT32 |
When an OffsetsForLeaderEpoch request is received from a consumer, the returned offset will be limited to the high watermark. As with the Fetch API, when a leader has just been elected, the true high watermark is not known for a short time. If an OffsetsForLeaderEpoch request is received with the latest epoch during this window, the leader will respond with the OFFSET_NOT_AVAILABLE error code. This will cause the consumer to retry. Note as well that only leaders are allowed to handle OffsetsForLeaderEpoch queries.
Consumer Changes
We will expose a new plugin interface that allows the user to provide custom logic to determine the preferred replica to fetch from.
...