I'd like to extend Kafka DefaultPartitioner to make a custom one. However, I find no way to access the message headers as the partitioning should be based on a value present there.
EDIT 1: The task is choosing a partition not based on the key but on another integer contained in the header.