Balance receives a message and a set of available partitions and returns the partition number that the message should be routed to. An application should refrain from using a balancer to manage multiple sets of partitions (from different topics for examples), use one balancer instance for each part
(msg Message, partitions ...int)
| 23 | // instance for each partition set, so the balancer can detect when the |
| 24 | // partitions change and assume that the kafka topic has been rebalanced. |
| 25 | Balance(msg Message, partitions ...int) (partition int) |
| 26 | } |
| 27 | |
| 28 | // BalancerFunc is an implementation of the Balancer interface that makes it |
no outgoing calls
no test coverage detected