From 7b7962675a8a3d0d2c69c76f1ab86a3a9689f81d Mon Sep 17 00:00:00 2001 From: doubleceston Date: Thu, 8 Dec 2016 16:46:07 +0800 Subject: [PATCH] add config setting in order for the Successes channel to be populated,have to set config.Producer.Return.Successes to true --- examples/http_server/http_server.go | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/http_server/http_server.go b/examples/http_server/http_server.go index 03e47b6b2..b6d83c5dc 100644 --- a/examples/http_server/http_server.go +++ b/examples/http_server/http_server.go @@ -196,6 +196,7 @@ func newDataCollector(brokerList []string) sarama.SyncProducer { config := sarama.NewConfig() config.Producer.RequiredAcks = sarama.WaitForAll // Wait for all in-sync replicas to ack the message config.Producer.Retry.Max = 10 // Retry up to 10 times to produce the message + config.Producer.Return.Successes = true tlsConfig := createTlsConfiguration() if tlsConfig != nil { config.Net.TLS.Config = tlsConfig