java - What is difference between consuming messages from bootstrap server and zookeeper? -


i beginner apache kafka. confused between bootstrap server , zookeeper. please explain bootstrap server in kafka , how different zookeeper? mean consume messages bootstrap server or zookeeper.

you confused because kafka has 2 consumers, old , new.

you should use new one, means need configure bootstrap-servers (urls of kafka brokers consuming from) , no need define zookeeper connection url.

if use old consumer, requires zookeeper maintain state (last message read each partition) - give zookeeper url (since needs zookeeper anyway) , uses zookeeper find kafka brokers.


Comments