title: KafkaTimeoutError: Failed to update metadata after 60.0 secs
body: <p>I have a use case of high throughput kafka producer where I want to push thousands of json messages every second.</p>
  
  <p>I have a 3 node kafka cluster and I am using latest kafka-python library and have following method to produce message</p>
  
  <pre><code>def publish_to_kafka(topic):
      data = get_data(topic)
      producer = KafkaProducer(bootstrap_servers=['b1', 'b2', 'b3'],
                               value_serializer=lambda x: dumps(x).encode('utf-8'), compression_type='gzip')
      try:
          for obj in data:
             producer.send(topic, value=obj)
      except Exception as e:
              logger.error(e)
      finally:
          producer.close()
  </code></pre>
  
  <p>My topic has 3 partitions.</p>
  
  <p>Methods works correctly sometimes and fails with error "KafkaTimeoutError: Failed to update metadata after 60.0 secs." </p>
  
  <p>What settings I needs to change to get it work smoothly?</p>