func NewRandomPartitioner(topic string) Partitioner {
	p := new(randomPartitioner)
	p.generator = rand.New(rand.NewSource(time.Now().UTC().UnixNano()))
	return p
}
NewRandomPartitioner returns a Partitioner which chooses a random partition each time.
package sarama
import (
	"hash"
	"hash/fnv"
	"math/rand"
	"time"
)
type Partitioner interface {
	Partition(message *ProducerMessage, numPartitions int32) (int32, error)
	RequiresConsistency() bool
}
type PartitionerConstructor func(topic string) Partitioner
type manualPartitioner struct{}
func NewManualPartitioner(topic string) Partitioner {
	return new(manualPartitioner)
}
func (p *manualPartitioner) Partition(message *ProducerMessage, numPartitions int32) (int32, error) {
	return message.Partition, nil
}
func (p *manualPartitioner) RequiresConsistency() bool {
	return true
}
type randomPartitioner struct {
	generator *rand.Rand
}