Reputation: 3973
There were some disadvantages of using The SimpleConsumer in the previous versions of Kafka 0.8
In the latest version of Kafka we have a unified Consumer which polls to get messages. How should one track and handle broker/leader changes?
Upvotes: 1
Views: 265
Reputation: 522
In the new version, for consumer offset management, we have a default topic called "__consumer_offsets"
, rather than relying on zookeeper or manually managing it as in the 0.8 version.
The broker leader changes is still handled through zookeeper. Remember, even in the current version, Kafka does need zookeeper to work. It is just the consumer offset dependency which has changed. So, zookeeper tracks the broker/leader election.
Also, as a consumer, you really need not worry about broker leader changes. If you are using a client with high level API for consumer, you only need to specify Consumer Group ID, Topic to consume and broker list (few servers to identify the cluster, the topic might not even reside there)
Upvotes: 1