Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

difference between bootstrap.servers and metadata.broker.list

Highlighted

difference between bootstrap.servers and metadata.broker.list

New Contributor

Hi ,

Initially i was working on a kafka project using the deprecated API and was using metadata.broker.list property to connect to the broker ...New API suggests usage of bootstrap.servers property instead ... I could find where the bootstrap.servers property is set so i used the value of metadata.broker.list and it worked.... Didnt find a good enough documentation on the property so can someone tell me the difference between the two and where to find bootstrap.servers property ??/

1 REPLY 1

Re: difference between bootstrap.servers and metadata.broker.list

Super Guru

@Sumit Chauhan

It looks like metadata.broker.list is deprecated and we need to use bootstrap.servers instead.

I found below github code snippet where it says metadata.broker.list is deprecated

https://github.com/apache/samza/blob/master/samza-kafka/src/main/scala/org/apache/samza/config/Kafka...

val bootsrapServers = {
    if(properties.containsKey("metadata.broker.list"))
      warn("Kafka producer configuration contains 'metadata.broker.list'. This configuration is deprecated . Samza has been upgraded " +
             "to use Kafka's new producer API. Please update your configurations based on the documentation at http://kafka.apache.org/documentation.html#newproducerconfigs")
    Option(properties.get("bootstrap.servers"))
            .getOrElse(throw new SamzaException("No bootstrap servers defined in config for %s." format systemName))
            .asInstanceOf[String]

bootstrap.servers

http://kafka.apache.org/documentation.html

metadata.broker.list

http://kafka.apache.org/081/configuration.html

Hope this information helps!