Kafka Streams Topology stuck in num.stream.threads=50 and 100 partitions

笑着哭i 提交于 2020-01-04 05:54:22

问题


There is a topology:

kStreamBuilder.stream(kafkaProperties.getInboundTopicName(), consumed)
            .filterNot((k,v) -> Objects.isNull(v))
            .transform(() -> new CustomTransformer(...))
            .transform(() -> new AnotherTransformer(...))
            .to(kafkaProperties.getOutTopicName(), resultProduced);

with configured

num.stream.threads: 50

On startup application stuck with constantly logging messages(I'm not 100% sure it stuck but after 20 minutes there are no changes in the state and CPU, network usage is very high) :

State transition from RUNNING to PARTITIONS_REVOKED    
AbstractCoordinator          : [Consumer clientId=consumer_id-StreamThread-1-consumer, groupId=group_id] (Re-)joining group
AbstractCoordinator          : [Consumer clientId=consumer_id-StreamThread-2-consumer, groupId=group_id] (Re-)joining group
AbstractCoordinator          : [Consumer clientId=consumer_id-StreamThread-3-consumer, groupId=group_id] (Re-)joining group
AbstractCoordinator          : [Consumer clientId=consumer_id-StreamThread-4-consumer, groupId=group_id] (Re-)joining group
AbstractCoordinator          : [Consumer clientId=consumer_id-StreamThread-5-consumer, groupId=group_id] (Re-)joining group

etc.

Topic has 100 partitions.

What we noticed: every transformer uses it's own persistentStateStore. After replacing it to inMemoryStateStore there still were logs written above but after ~3 minutes topology started successfully.

Kafka streams version 2.1.0. Broker version 1.1.0

来源:https://stackoverflow.com/questions/55284592/kafka-streams-topology-stuck-in-num-stream-threads-50-and-100-partitions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!