简体   繁体   English

Kafka Streams是否对处理时间进行超时?

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

I'm using Kafka Streams that call external systems during map/foreach . 我正在使用在map/foreach期间调用外部系统的Kafka Streams。 Is there any timeout on how long map or foreach can take? mapforeach可以花费多长时间?

Are there any caveats to blocking for a long time (say hours)? 在长时间(例如几个小时)内是否有要阻止的警告?

There is no timeout applied to map/foreach . 没有超时适用于map/foreach

However, as Kafka Streams uses KafkaConsumer and KafkaProducer internally, all their timeouts apply (eg. max.poll.interval.ms ). 但是,由于Kafka Streams在内部使用KafkaConsumerKafkaProducer ,因此它们的所有超时都适用(例如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. 使用Kafka Connect将外部服务中的数据加载到主题中,并在应用程序中以KTable读取此数据, KTable执行流表KTable而不是映射,这将具有很多优点。 This approach decouples your Streams application from the external system and thus makes the overall architecture more robust. 这种方法使您的Streams应用程序与外部系统脱钩,从而使整体体系结构更强大。

暂无
暂无

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

相关问题 我们可以使用 CompletableFutures 进行并行 Kafka Streams 处理吗 - Can we do parallel Kafka Streams processing with CompletableFutures 如何使用 Kafka Streams 和 Spring Kafka Streams 定期(每 5 分钟)暂停和恢复 stream 处理? - How can I pause and resume stream processing periodically(every 5 minutes) using Kafka Streams and Spring Kafka Streams? 如何为 Kafka Admin 操作配置(长)超时? - How can I configure (long) timeout for Kafka Admin operations? 如何使用 Avro (schemaRegistry) 对 Kafka Streams 进行功能测试? - How can do Functional tests for Kafka Streams with Avro (schemaRegistry)? 如何使用 Spring Cloud Stream 和 Kafka Streams Binder 暂停(打开/关闭)stream 处理? - How can I pause (turn on/off) stream processing w/ Spring Cloud Stream & Kafka Streams Binder? 测量Kafka Streams中的处理吞吐量 - Measure processing throughput in Kafka Streams 如何在 Kafka Streams 应用程序中处理偏移提交期间的超时异常 - How to handle Timeout exceptions during Offset Commit in a Kafka Streams application 消息密钥在Kafka Streams中为Long - Message key as Long in Kafka Streams 处理Kafka消息时,如何处理session超时? - How to handle session timeout while processing Kafka messages? 如果在处理步骤中发生故障,如何使 Spring 云 stream Kafka 流活页夹重试处理消息? - How to make Spring cloud stream Kafka streams binder retry processing a message if a failure occurs during the processing step?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM