Open feldgendler opened 4 years ago
Describe the bug After reading once, Reader.Close hangs until the end of a MaxWait duration.
Reader.Close
MaxWait
Kafka Version 2.3.0
To Reproduce
package main import ( "context" "fmt" "time" "github.com/segmentio/kafka-go" ) func main() { reader := kafka.NewReader(kafka.ReaderConfig{ Brokers: []string{"localhost:9092"}, // assuming a running Kafka instance Topic: "test", // does not need to exist MaxWait: time.Hour, }) ctx, cancel := context.WithTimeout(context.Background(), time.Second) defer cancel() fmt.Println("Trying to read...") _, _ = reader.FetchMessage(ctx) fmt.Println("Closing reader...") reader.Close() fmt.Println("Test passed") }
Expected behavior Reader.Close should close the connection and return immediately.
+1
had the same issue any fix for it?
Having the same issue +1
i've got the same issue
Describe the bug After reading once,
Reader.Close
hangs until the end of aMaxWait
duration.Kafka Version 2.3.0
To Reproduce
Expected behavior
Reader.Close
should close the connection and return immediately.