code: func (ref *AsyncProducer) successHandler(in <-chan *sarama.ProducerMessage) {
  	ref.Debug("starting success handler ...")
  	for {
  		select {
  		case <-ref.closeChannel:
  			ref.Debug("success handler exited ...")
  			return
  		case msg := <-in:
  			if msg == nil {
  				continue
  			}
  			ref.Debugf("Message is stored in topic(%s)/partition(%d)/offset(%d)\n", msg.Topic, msg.Partition, msg.Offset)
  			pmsg := &ProducerMessage{
  				Topic:     msg.Topic,
  				Key:       msg.Key,
  				Value:     msg.Value,
  				Metadata:  msg.Metadata,
  				Offset:    msg.Offset,
  				Partition: msg.Partition,
  			}
  			ref.Config.SuccessChan <- pmsg
  		}
  	}
  }
docs: // successHandler handles success messages