segmentio / kafka-go

Kafka library in Go
MIT License
7.52k stars 780 forks source link

Asynchronous mode in kafka package not working #1258

Closed HosseinRouhi79 closed 6 months ago

HosseinRouhi79 commented 8 months ago

I am trying to use the kafka-go package to write data to Kafka asynchronously, but it is not working. When I use synchronous mode, the data is written to Kafka successfully. However, when I use asynchronous mode, the data is not written to Kafka and the Write method returns immediately.

var wr = kafka.Writer{ Addr: kafka.TCP("localhost:9092", "localhost:9093"), Balancer: &kafka.CRC32Balancer{}, Async: true, }