到达 GlobalKTable 主题的数据是否触发加入?
Does data arriving to the topic of GlobalKTable trigger join?
我有两个主题,数据如下:
<ClientId, ClientConfiguration> configurationTopic;
<ClientId, User> userTopic;
ClientId 在这里只是一个 UUID 字符串。
configurationTopic 相当小,可以压缩,因为我们只关心任何客户端的最新配置。
userTopic 将变得更大。我看不出如何按 clientId 对其进行分区,因为系统永远无法扩展。具有更多用户的客户端的性能会明显变差,因为所有消息都必须由单个消费者读取。
我需要做的是,每当我们获得更新的用户(创建、更新、删除)时,我想使用最新的 ClientConfiguration 重新处理该用户。如果 ClientConfiguration 得到更新,我需要为每个用户重新处理该配置。我确实意识到这可能会重新处理大量数据,但只要工作可以分散到多个消费者就应该没问题。
我正在考虑将 ConfigurationTopic 变成一个全局 KTable,这将允许我使用循环法将用户分成主题。但是,关于 GlobalKTables 如何工作的信息很少。
来自here:
Data arriving in the GlobalKTable will not trigger the join.
这是真的吗?如果是这样,我该如何设计此联接来满足我的需要?
Data arriving in the GlobalKTable will not trigger the join.
是的,这成立。
If the ClientConfiguration gets updated I need to re-process that configuration for each User.
如果这意味着您想要 userTopic
的 seekToBeginning()
并重新读取此数据,那么您不能为此使用来自 Kafka Streams 的连接。
网络上关于联接的一些 material:
If the ClientConfiguration gets updated I need to re-process that configuration for each User.
我目前对 GlobalKTable 的理解是,实现这种行为的唯一方法是简单地(?)将每个用户再次发送到 userTopic
。
无论如何,这正是 Kafka Streams 会做的,所以不是 Kafka Streams,而是你的工作。
我有两个主题,数据如下:
<ClientId, ClientConfiguration> configurationTopic;
<ClientId, User> userTopic;
ClientId 在这里只是一个 UUID 字符串。
configurationTopic 相当小,可以压缩,因为我们只关心任何客户端的最新配置。
userTopic 将变得更大。我看不出如何按 clientId 对其进行分区,因为系统永远无法扩展。具有更多用户的客户端的性能会明显变差,因为所有消息都必须由单个消费者读取。
我需要做的是,每当我们获得更新的用户(创建、更新、删除)时,我想使用最新的 ClientConfiguration 重新处理该用户。如果 ClientConfiguration 得到更新,我需要为每个用户重新处理该配置。我确实意识到这可能会重新处理大量数据,但只要工作可以分散到多个消费者就应该没问题。
我正在考虑将 ConfigurationTopic 变成一个全局 KTable,这将允许我使用循环法将用户分成主题。但是,关于 GlobalKTables 如何工作的信息很少。
来自here:
Data arriving in the GlobalKTable will not trigger the join.
这是真的吗?如果是这样,我该如何设计此联接来满足我的需要?
Data arriving in the GlobalKTable will not trigger the join.
是的,这成立。
If the ClientConfiguration gets updated I need to re-process that configuration for each User.
如果这意味着您想要 userTopic
的 seekToBeginning()
并重新读取此数据,那么您不能为此使用来自 Kafka Streams 的连接。
网络上关于联接的一些 material:
If the ClientConfiguration gets updated I need to re-process that configuration for each User.
我目前对 GlobalKTable 的理解是,实现这种行为的唯一方法是简单地(?)将每个用户再次发送到 userTopic
。
无论如何,这正是 Kafka Streams 会做的,所以不是 Kafka Streams,而是你的工作。