Using kafka-go, how to achieve automatic reconnection after disconnection?

Viewed 43

In my go project, I use "github.com/segmentio/kafka-go" as a client to connect kafka. However, in the actual operation process, sometimes the project will be disconnected from the kafka cluster due to network and other reasons. I want to implement automatic reconnection after the program is disconnected from kafka, what should I do?

0 Answers
Related