Bootstrap Server vs Kafka中的Zookeeper? [英] Bootstrap server vs zookeeper in kafka?

查看:389
本文介绍了Bootstrap Server vs Kafka中的Zookeeper?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

为什么不建议在kafka-consumer中使用zookeeper,为什么建议改为使用引导服务器? 引导服务器的优点是什么?

Why the use of zookeeper in kafka-consumer is deprecated and why it's recommended to use the bootstrap server instead ? what are the advantages of the bootstrap-server?

推荐答案

Kafka使用者需要将偏移量提交给kafka,并从kafka获取偏移量.由于kafka将抵销存储从zookeeper转移到kafka经纪人,因此kafka使用者无需直接与zookeeper进行通信,因此新的kafka使用者无需配置Zookeeper.

Kafka consumer need to commit the offset to kafka and fetch the offset from kafka. Since kafka moved the offset storage from zookeeper to kafka brokers, a kafka consumer does not need to directly communicate with zookeeper, so the new kafka consumer does not need to config the zookeeper.

但是,kafka使用者始终需要连接到kafka经纪人(集群)才能将请求发送到服务器,bootstrap-server只是该集群的某些经纪人,使用它,消费者就可以找到所有经纪人.

However, a kafka consumer always needs to connect to kafka brokers (cluster) to send the request to server, the bootstrap-server is just some brokers of this cluster, and using this, consumer could find all the brokers.

这篇关于Bootstrap Server vs Kafka中的Zookeeper?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆