title: Spring Boot - Remote Zookeper configuration
body: <p>In our Spring Boot program we are switching from a local Zookeeper and Apache Kafka servers to a remote ones (the best solution we have found at the moment is cloudkarafka, but that is not important).</p>
  
  <p>From this provider we have downloaded the properties we have to add to our properties Kafka confguration map in order to use remote Kafka, such as bootstrap servers, but after all this, Spring Boot continues searching Zookeeper in local machine. Is there anything I can do?</p>
  
  <p>application.yml</p>
  
  <pre><code>spring:
   cloud:
    zookeeper:
     connect-string: server:2181
  </code></pre>
  
  <p>Properties map</p>
  
  <pre><code>Map&lt;String, Object&gt; props = new HashMap&lt;&gt;();
      props.put("bootstrap.servers", getBrokers());
      props.put(ConsumerConfig.ENABLE_AUTO_COMMIT_CONFIG, false);
      props.put(ConsumerConfig.AUTO_COMMIT_INTERVAL_MS_CONFIG, "100");
      props.put(ConsumerConfig.SESSION_TIMEOUT_MS_CONFIG, "15000");
      props.put(ConsumerConfig.KEY_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class);
      props.put(ConsumerConfig.VALUE_DESERIALIZER_CLASS_CONFIG, StringDeserializer.class);
      props.put("security.protocol", "SSL");
      props.put("ssl.truststore.location", "truststore.jks");
      props.put("ssl.truststore.password", "test1234");
      props.put("ssl.keystore.location", "keystore.jks");
      props.put("ssl.keystore.password", "pass");
      props.put("ssl.keypassword", "pass");
      props.put("zk.connect", "server:2181");
  </code></pre>
  
  <p>Thank you.</p>