NewManualPartitioner returns a Partitioner which uses the partition manually set in the provided ProducerMessage's Partition field as the partition to produce to.
(topic string)
| 80 | // NewManualPartitioner returns a Partitioner which uses the partition manually set in the provided |
| 81 | // ProducerMessage's Partition field as the partition to produce to. |
| 82 | func NewManualPartitioner(topic string) Partitioner { |
| 83 | return new(manualPartitioner) |
| 84 | } |
| 85 | |
| 86 | func (p *manualPartitioner) Partition(message *ProducerMessage, numPartitions int32) (int32, error) { |
| 87 | return message.Partition, nil |
no outgoing calls