title: How to send message to a particular partition in Kafka?
body: <p>I have created a topic that has many partitions. Using the console producer I want to send messages to particular partitions and view the through the console consumer.
  On the console producer I have tried this,</p>
  
  <pre><code>kafka-console-producer.bat --broker-list localhost:9092 --topic sample  --property parse.key=true --property key.separator=,
  </code></pre>
  
  <p>Send messages as,</p>
  
  <pre><code>key1,another-message
  </code></pre>
  
  <p>But I am just confused on whether <strong>key1</strong> represents <strong>partition number</strong>.</p>
  
  <p>Using the console consumer I viewed the messages,</p>
  
  <pre><code>kafka-console-consumer.bat --zookeeper localhost:2181 --topic sample
  </code></pre>
  
  <p>I want to view the messages according to the partitions. Is this the right way to view the messages on the console consumer? Can anyone please provide a clear understanding on this?</p>