Do Kafka Streams have a timeout on how long processing can take?

不想你离开。 提交于 2021-01-28 09:57:40

问题


I'm using Kafka Streams that call external systems during map/foreach. Is there any timeout on how long map or foreach can take?

Are there any caveats to blocking for a long time (say hours)?


回答1:


There is no timeout applied to map/foreach.

However, as Kafka Streams uses KafkaConsumer and KafkaProducer internally, all their timeouts apply (eg. max.poll.interval.ms). You can of course configure them accordingly, but it's not recommended to do long blocking calls to external systems.

It would have many advantages, to load the data from you external service into a topic using Kafka Connect, and read this data as a KTable in your application a do a stream-table join instead of a map. This approach decouples your Streams application from the external system and thus makes the overall architecture more robust.



来源:https://stackoverflow.com/questions/45115949/do-kafka-streams-have-a-timeout-on-how-long-processing-can-take

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