fix #333 : regression bug introduced by sarama library

This commit is contained in:
Nicolas Reboul 2018-07-03 14:27:01 +02:00
parent d66abaccb0
commit 8c077249d9
1 changed files with 3 additions and 0 deletions

View File

@ -60,6 +60,9 @@ func (conn *KafkaConn) Send(msg string) error {
cfg.Net.DialTimeout = time.Second
cfg.Net.ReadTimeout = time.Second * 5
cfg.Net.WriteTimeout = time.Second * 5
// Fix #333 : fix backward incompatibility introduced by sarama library
cfg.Producer.Return.Successes = true
c, err := sarama.NewSyncProducer([]string{uri}, cfg)
if err != nil {
return err