io.gearpump.streaming.dsl.partitioner
First apply message with groupBy function, then pick the hashCode of the output to do the partitioning. You must define hashCode() for output type of groupBy function.
For example: case class People(name: String, gender: String)
object Test{
val groupBy: (People => String) = people => people.gender val partitioner = GroupByPartitioner(groupBy) }
Partition messages by applying group by function first.