I am creating a kafka producer and I want to specify partitionId as well while sending the message according to the message type. I have type-partitonId mapping in my Mysql table. In case of new message type I have to create new partition and save that id to Mysql so that it can directly send message to that Id next time same type comes. How can I create new partition for a topic and get the created partitionId ? I am using latest kafka API .9 and Java 1.8.