According to the Kafka documentation:
The producer is responsible for choosing which message to assign to which partition within the topic.
C:\arunsingh\demo\kafka_2.13-2.4.0\bin\windows>kafka-console-producer.bat --broker-list 127.0.0.1:9094 --topic arun_topic --property parse.key=true --property key.separator=, --producer-property acks=all >myKey1, Message with key >myKey2, Message with key 2 >