code: func (ref *SyncProducer) SendMsgByte(topic string, key []byte, msg []byte) (*ProducerMessage, error) {
  	// generate a key if none supplied (used by hash partitioner)
  	ref.WithFields(logging.Fields{"key": key, "msg": msg}).Debug("Sending")
  
  	if key == nil || len(key) == 0 {
  		md5Sum := fmt.Sprintf("%x", md5.Sum(msg))
  		return ref.SendMsgToPartition(topic, ref.Partition, sarama.ByteEncoder(md5Sum), sarama.ByteEncoder(msg))
  	}
  	return ref.SendMsgToPartition(topic, ref.Partition, sarama.ByteEncoder(key), sarama.ByteEncoder(msg))
  }
docs: // SendMsgByte sends a message to Kafka