code: func (ref *SyncProducer) SendMsgToPartition(topic string, partition int32, key sarama.Encoder, msg sarama.Encoder) (*ProducerMessage, error) {
  	if msg == nil {
  		err := errors.New("nil message can not be sent")
  		ref.Error(err)
  		return nil, err
  	}
  	message := &sarama.ProducerMessage{
  		Topic:     topic,
  		Partition: partition,
  		Value:     msg,
  		Key:       key,
  	}
  
  	partition, offset, err := ref.Producer.SendMessage(message)
  	pmsg := &ProducerMessage{
  		Topic:     message.Topic,
  		Key:       message.Key,
  		Value:     message.Value,
  		Metadata:  message.Metadata,
  		Offset:    offset,
  		Partition: partition,
  	}
  	if err != nil {
  		return pmsg, err
  	}
  
  	ref.Debugf("message sent: %s", pmsg)
  	return pmsg, nil
  }
docs: // SendMsgToPartition sends a message to Kafka