title: Publish message to Confluent cloud cluster by kafka-python
body: <p>I am using kafka-python package to publish messages to kafka confluent cloud cluster.</p>
  
  <p>My code looks like below:</p>
  
  <pre><code>    from kafka import KafkaProducer
      producer=KafkaProducer(
                      bootstrap_servers='pkc-epgnk.us-central1.gcp.confluent.cloud:9092',
                      security_protocol='SASL_SSL',
                      sasl_mechanism='PLAIN',
                      ssl_certfile='/usr/local/etc/openssl/cert.pem',
                      sasl_plain_username='[api_key]',
                      sasl_plain_password='[api_secret]')
  
      producer.prodcue(topic='file-ingestion',key=b'',value=b'test')
  </code></pre>
  
  <p>Running above code I get below error:</p>
  
  <pre><code>kafka.errors.NoBrokersAvailable: NoBrokersAvailable
  </code></pre>
  
  <p>The confluent kafka manual suggested me to set below values for a C/C++ producer; however, I can not set all values by the kafka-python producer</p>
  
  <pre><code>bootstrap.servers=pkc-epgnk.us-central1.gcp.confluent.cloud:9092
  api.version.request=true
  broker.version.fallback=0.10.0.0
  api.version.fallback.ms=0
  sasl.mechanisms=PLAIN
  security.protocol=SASL_SSL
  ssl.ca.location=/usr/local/etc/openssl/cert.pem
  sasl.username=&lt;CLUSTER_API_KEY&gt;
  sasl.password=&lt;CLUSTER_API_SECRET&gt;
  </code></pre>