The sample producer code at https://github.com/confluentinc/confluent-kafka-go calls Producer.Produce(...) It writes the message to the sending buffer queue and return immediately. However, writing to the internal buffer queue does not guarantee successful message delivery. How can we ensure sucessful message delivery here?
for idx, word := range []string{"Welcome", "to", "the",
"Confluent", "Kafka", "Golang", "client"} {
start_time := time.Now().UnixNano()
p.Produce(&kafka.Message{
TopicPartition: kafka.TopicPartition{Topic: &topic,
Partition: kafka.PartitionAny},
Value: []byte(word),
}, nil)
}