code: func (m *Main) Run() error {
  	conf := sarama.NewConfig()
  	conf.Version = sarama.V0_10_0_0
  	conf.Producer.Return.Successes = true
  	producer, err := sarama.NewSyncProducer(m.Hosts, conf)
  	if err != nil {
  		return errors.Wrap(err, "getting new producer")
  	}
  	defer producer.Close()
  
  	for ticker := time.NewTicker(m.Rate); true; <-ticker.C {
  		ev := fake.GenEvent()
  		msg := &sarama.ProducerMessage{Topic: m.Topic, Value: JSONEvent(*ev)}
  		_, _, err := producer.SendMessage(msg)
  		if err != nil {
  			log.Printf("Error sending message: '%v', backing off", err)
  			time.Sleep(time.Second * 10)
  		}
  	}
  	return nil
  }
docs: // Run runs the kafka generator.