Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(consumer): follow preferred broker
Historically (before protocol version 11) if we attempted to consume from a follower, we would get a NotLeaderForPartition response and move our consumer to the new leader. However, since v11 the Kafka broker treats us just like any other follower and permits us to consume from any replica and it is up to us to monitor metadata to determine when the leadership has changed. Modifying the handleResponse func to check the topic partition leadership against the current broker (in the absence of a preferredReadReplica) and trigger a re-create of the consumer for that partition Contributes-to: #1927
- Loading branch information
1aac8e5
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
introduces regression, see #2071