NewRoundRobinPartitioner returns a Partitioner which walks through the available partitions one at a time.
(topic string)
| 116 | |
| 117 | // NewRoundRobinPartitioner returns a Partitioner which walks through the available partitions one at a time. |
| 118 | func NewRoundRobinPartitioner(topic string) Partitioner { |
| 119 | return &roundRobinPartitioner{} |
| 120 | } |
| 121 | |
| 122 | func (p *roundRobinPartitioner) Partition(message *ProducerMessage, numPartitions int32) (int32, error) { |
| 123 | if p.partition >= numPartitions { |
no outgoing calls