nikel
nikel

Reputation: 3564

Why do we need to add all zookeeper nodes in Kafka Consumer Configuration

Looks like we need to add the ip addresses of all zookeeper nodes in the property "zookeeper.connect" for configuring a consumer.

Now my understanding says the zookeeper cluster has a leader which is managed in a fail-safe way.

So, why cant we just provide a bootstrap list for zookeeper nodes like its done in Producer configuration(while providing bootstrap broker list) & they should provide metadata about the entire zookeeper cluster?

Upvotes: 2

Views: 510

Answers (1)

Chris Gerken
Chris Gerken

Reputation: 16400

You can specify a subset of the nodes. The nodes in that list are only used to get an initial connection to the cluster of nodes and the client goes through the list until a connection is made. Usually the first node is up and available so the client doesn't have to go too far into the list. So you only need to add extra nodes to the list depending on how pessimistic you are.

Upvotes: 2

Related Questions