View Source KafkaEx.DefaultPartitioner (kafka_ex v0.14.0)
Default partitioner implementation.
When message key is set and partition isn't, partition is decided based on murmur2 hash of a key to provide Java implementation consistency. When message key and partition is missing, partition is selected randomly. When partition is provided nothing changes.
Summary
Functions
Callback implementation for KafkaEx.Partitioner.assign_partition/2
.
Functions
@spec assign_partition( request :: KafkaEx.Protocol.Produce.Request.t(), metadata :: KafkaEx.Protocol.Metadata.Response.t() ) :: KafkaEx.Protocol.Produce.Request.t()
Callback implementation for KafkaEx.Partitioner.assign_partition/2
.