kafka-go: WriteMessages blocks indefinitely without returning error
I have an application that writes to a Kafka broker. It is configured with most of the default configuration in place like so:
config := kafka.WriterConfig{
Brokers: brokerlist,
Topic: topic,
}
w := kafka.NewWriter(config)
I’ve observed w.WriteMessages(ctx, msgs)
block without any apparent reason. I’ve been looking at the code to understand the underlying implementation. In what cases would this function block forever? If any maintainers can help diagnose this with me, it would be greatly appreciated.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 18 (5 by maintainers)
I think it’s possible that one of the requests is using the wrong API version. Keep an eye on this PR and try it when it gets merged:
https://github.com/segmentio/kafka-go/pull/80
Sorry we don’t have a better answer around this. I believe it’s mostly been tested against 1.0.x. (someone more knowledgable please correct me if wrong).