简体   繁体   English

Kafka 内部主题:创建的内部主题在哪里 - 源或目标代理?

[英]Kafka internal topic : Where are the internal topics created - source or target broker?

We are doing a stateful operation.我们正在做一个有状态的操作。 Our cluster is managed.我们的集群是被管理的。 Everytime for internal topic creation , we have to ask admin guys to unlock so that internal topics can be created by the kafka stream app.每次创建内部主题时,我们都必须要求管理员解锁,以便 kafka 流应用程序可以创建内部主题。 We have control over target cluster not source cluster.我们可以控制目标集群而不是源集群。

So, wanted to understand which cluster - source/ target are internal topics created?那么,想了解哪个集群 - 源/目标是内部主题创建的?

AFAIK,kafka-streams 应用程序连接到的只有一个集群,并且所有主题源/目标/内部都在那里创建。

So far, Kafka Stream applications can support connection to only one cluster as defined in the BOOTSTRAP_SERVERS_CONFIG in Stream configurations.到目前为止,Kafka Stream 应用程序只能支持连接到 Stream 配置中BOOTSTRAP_SERVERS_CONFIG中定义的一个集群。

As answered above also, all source topics reside in those brokers and all internal topics(changelog/repartition topics) are created in the same cluster.如上所述,所有源主题都驻留在这些代理中,并且所有内部主题(更改日志/重新分区主题)都在同一个集群中创建。 KStream app will create the target topic in the same cluster as well. KStream 应用程序也会在同一个集群中创建目标主题。

It will be worth looking into the server logs to understand and analyze the actual root cause.值得查看服务器日志以了解和分析实际的根本原因。

As the other answers suggest there should be only one cluster that the Kafka Stream application connects to.正如其他答案所暗示的那样,Kafka Stream 应用程序应该只连接到一个集群。 Internal topics are created by the Kafka stream application and will only be used by the application that created it.内部主题由 Kafka 流应用程序创建,并且只会被创建它的应用程序使用。 However, there could be some configuration related to security set on the Broker side which could be preventing the streaming application from creating these topics:但是,可能存在一些与 Broker 端的安全设置相关的配置,这可能会阻止流应用程序创建这些主题:

If security is enabled on the Kafka brokers, you must grant the underlying clients admin permissions so that they can create internal topics set.如果在 Kafka 代理上启用了安全性,您必须授予底层客户端管理员权限,以便他们可以创建内部主题集。 For more information, see Streams Security.有关更多信息,请参阅流安全。

Quoted from here这里引用

Another point to keep in mind is that the internal topics are automatically created by the Stream application and there is no explicit configuration for auto creation of internal topics.要记住的另一点是,内部主题是由 Stream 应用程序自动创建的,并且没有用于自动创建内部主题的显式配置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM