CRC32Balancer is a Balancer that uses the CRC32 hash function to determine which partition to route messages to. This ensures that messages with the same key are routed to the same partition. This balancer is compatible with the built-in hash partitioners in librdkafka and the language bindings th
| 254 | // best to leave the Consistent flag off. Otherwise, you run the risk of |
| 255 | // creating a very hot partition. |
| 256 | type CRC32Balancer struct { |
| 257 | Consistent bool |
| 258 | random randomBalancer |
| 259 | } |
| 260 | |
| 261 | func (b CRC32Balancer) Balance(msg Message, partitions ...int) (partition int) { |
| 262 | // NOTE: the crc32 balancers in librdkafka don't differentiate between nil |
nothing calls this directly
no outgoing calls
no test coverage detected