更改日志/重新分区主题的复制因子应该是多少 [英] What should be the replication factor of changelog/repartition topics

查看:28
本文介绍了更改日志/重新分区主题的复制因子应该是多少的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道可以为 kafka 流配置这些内部主题的复制因子,我们的应用程序使用复制因子为 3 的普通应用程序主题,但直到现在我没有为更改日志/重新分区主题配置复制因子,而我的假设是如果一个 broker 死亡(或由于某种原因领导者更改),kafka 流应用程序将自动重新平衡到新的领导者.

I know it is possible to configure replication factor these internal topics for the kafka streams, our application uses for normal application topics with replication factor 3 but until now I didn't configured the replication factor for the changelog/repartition topics while my assumption was if one broker dies (or for some reason leader changes) kafka stream application will automatically rebalance to new leader.

现在我不太确定如果内部主题不使用复制因子,正在运行的 Kafka Stream 应用程序是否可以重新平衡到新的领导者.

Now I am not so sure about a running Kafka Stream application can rebalance to new leader if the internal topics does not use replication factor.

对于这些内部主题,我们是否也应该使用复制因子 3?

Should we also use replication factor 3 for these internal topics?

感谢回答....

推荐答案

是的,您将希望对变更日志/重新分区主题使用与应用程序主题相同的复制因子.

Yes, you'll want to use the same replication factor of your application topics for your changelog/repartition topics.

您可以通过

properties.put(StreamsConfig.REPLICATION_FACTOR_CONFIG, 3)

HTH,账单

这篇关于更改日志/重新分区主题的复制因子应该是多少的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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