NewBalanceStrategyRoundRobin returns a round-robin balance strategy, which assigns partitions to members in alternating order. For example, there are two topics (t0, t1) and two consumer (m0, m1), and each topic has three partitions (p0, p1, p2): M0: [t0p0, t0p2, t1p1] M1: [t0p1, t1p0, t1p2]
()
| 390 | // M0: [t0p0, t0p2, t1p1] |
| 391 | // M1: [t0p1, t1p0, t1p2] |
| 392 | func NewBalanceStrategyRoundRobin() BalanceStrategy { |
| 393 | return new(roundRobinBalancer) |
| 394 | } |
| 395 | |
| 396 | // Deprecated: use NewBalanceStrategyRoundRobin to avoid data race issue |
| 397 | var BalanceStrategyRoundRobin = NewBalanceStrategyRoundRobin() |
no outgoing calls