title: Apache Kafka Producer Broker Connection
body: <p>I have a set of Kafka broker instances running as a cluster. I have a client that is producing data to Kafka:</p>
  
  <pre><code>props.put("metadata.broker.list", "broker1:9092,broker2:9092,broker3:9092");
  </code></pre>
  
  <p>When we monitor using tcpdump, I can see that only the connections to broker1 and broker2 are ESTABLISHED while for the broker3, there is no connection from my producer. I have a single topic with just one partition.</p>
  
  <p>My questions:</p>
  
  <ol>
  <li><p>How is the relation between number of brokers and topic partitions? Should I always have number of brokers = number of partitons?</p></li>
  <li><p>Why in my case, I'm not able to connect to broker3? or atleast my network monitoring does not show that a connection from my Producer is established with broker3?</p></li>
  </ol>
  
  <p>It would be great if I could get some deeper insight into how the connection to the brokers work from a Producer stand point.</p>