produceMessagesWithPartitions

Rewrites the partitions of messages using the passed Partitioner, after getting the list of partitions to write to