You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Kafka Producer gets stuck after partitionleadership changes from one broker to another. Once the message fails due
to Not Leader For Partition: the client attempted to send messages to a replica that is not the leader for some partition, the client's metadata are likely out of date, all subsequent messages do not get published
Kafka Version
What version(s) of Kafka are you testing against?
2.3.1
If we run this function in a loop and if we reassign partitions of a topic from one broker to another using kafka-reassign-partitions.sh, it returns the above the error and subsequent messages gets stuck
Expected behavior
A clear and concise description of what you expected to happen.
Function should ideally refresh metadata cache and continue processing
Additional context
Add any other context about the problem here.
On debugging into the source code, found a couple of observations
in writer.go
func (w *writer) run() {
....
case wm, ok := <-w.msgs:
...
}
This channel never pulls data out but
func (w *writer) messages() chan<- writerMessage {
return w.msgs
}
i can see messages are getting into this function.
This behaviour is after we get a client metadata change error
The text was updated successfully, but these errors were encountered:
Describe the bug
Kafka Producer gets stuck after partition leadership changes from one broker to another. Once the message fails due
to Not Leader For Partition: the client attempted to send messages to a replica that is not the leader for some partition, the client's metadata are likely out of date, all subsequent messages do not get published
Kafka Version
What version(s) of Kafka are you testing against?
2.3.1
To Reproduce
If we run this function in a loop and if we reassign partitions of a topic from one broker to another using kafka-reassign-partitions.sh, it returns the above the error and subsequent messages gets stuck
Expected behavior
A clear and concise description of what you expected to happen.
Function should ideally refresh metadata cache and continue processing
Additional context
Add any other context about the problem here.
On debugging into the source code, found a couple of observations
in writer.go
This channel never pulls data out but
i can see messages are getting into this function.
This behaviour is after we get a client metadata change error
The text was updated successfully, but these errors were encountered: