apache-kafka-streams

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

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

余生长醉 提交于 2021-01-28 09:54:16
问题 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

Kafka Streams: Internal topic partitions

萝らか妹 提交于 2021-01-28 09:34:53
问题 Kafka version: 1.0.0 Let's say the stream application uses low level processor API which maintains the state and reads from a topic with 10 partitions. Please clarify if the internal topic is expected to be created with the same number of partitions OR is it per the broker default. If it's the later, if we need to increase the partitions of the internal topic, is there any option? 回答1: Kafka Streams will create the topic for you. And yes, it will create it with the same number of partitions

Why does Kafka Streams enforce logging disabled for GlobalKTable state stores?

可紊 提交于 2021-01-27 14:50:27
问题 Why must a global table not have logging enabled in kafka? code: if (loggingEnabled) { throw new TopologyException("StateStore " + storeName + " for global table must not have logging enabled."); } When I am restarting my kafka application all the datastore in globalstore is getting clean. How could I can made it tolerance. 回答1: GlobalKTable s use their input topic to guarantee fault-tolerance. Thus, I am not sure what you mean by When I am restarting my kafka application all the datastore in

Kafka-streams: Why do all partitions get assigned to the same consumer in the consumergroup?

蓝咒 提交于 2021-01-25 03:40:36
问题 Background Several machines generate events. These events get sent to our Kafka cluster, where each machine has its own topic (app.machine-events. machine-name ). Because order is important on a per-machine basis, and partition-size is not an issue for now, all topics consist of a single partition. Therefore N topics also means N partitions, currently. The consuming/processing app makes use of kafka-streams, which we've given the StreamsConfig.APPLICATION_ID_CONFIG / "application.id" 'machine

Kafka-streams: Why do all partitions get assigned to the same consumer in the consumergroup?

假装没事ソ 提交于 2021-01-25 03:38:04
问题 Background Several machines generate events. These events get sent to our Kafka cluster, where each machine has its own topic (app.machine-events. machine-name ). Because order is important on a per-machine basis, and partition-size is not an issue for now, all topics consist of a single partition. Therefore N topics also means N partitions, currently. The consuming/processing app makes use of kafka-streams, which we've given the StreamsConfig.APPLICATION_ID_CONFIG / "application.id" 'machine

Kafka-streams: Why do all partitions get assigned to the same consumer in the consumergroup?

亡梦爱人 提交于 2021-01-25 03:36:13
问题 Background Several machines generate events. These events get sent to our Kafka cluster, where each machine has its own topic (app.machine-events. machine-name ). Because order is important on a per-machine basis, and partition-size is not an issue for now, all topics consist of a single partition. Therefore N topics also means N partitions, currently. The consuming/processing app makes use of kafka-streams, which we've given the StreamsConfig.APPLICATION_ID_CONFIG / "application.id" 'machine

How to remove/clear state stores in Kafka Streams?

独自空忆成欢 提交于 2021-01-22 05:00:06
问题 I have a custom Transformer implementation in the end of my kafka-streams DSL, with a persistent changelog KeyValueStore bound to it. Since few weeks I have been putting way too much data in the store. Now whenever I load the application it eats up way too much RAM. However, the application itself is just a prototype so I don't mind clearing the store entirely. I could rename the kafka.application.id and the state-store-name but that's a temporary workaround(and the corresponding data/topics

How to eval code that uses InterfaceStability annotation (that fails with “illegal cyclic reference involving class InterfaceStability”)?

筅森魡賤 提交于 2021-01-15 06:40:47
问题 I want to dynamically generate some kafka stream code when the program is running, but I get an exception when I compile the following code for kafka stream with scala toolbox eval: val toolbox = runtimeMirror(getClass.getClassLoader).mkToolBox() val code = """ |import org.apache.kafka.streams.scala.kstream.KStream |import org.apache.kafka.streams.scala.StreamsBuilder | |class ClassA { | def createStream(): KStream[String, String] = { | import org.apache.kafka.streams.scala

How to eval code that uses InterfaceStability annotation (that fails with “illegal cyclic reference involving class InterfaceStability”)?

一笑奈何 提交于 2021-01-15 06:37:43
问题 I want to dynamically generate some kafka stream code when the program is running, but I get an exception when I compile the following code for kafka stream with scala toolbox eval: val toolbox = runtimeMirror(getClass.getClassLoader).mkToolBox() val code = """ |import org.apache.kafka.streams.scala.kstream.KStream |import org.apache.kafka.streams.scala.StreamsBuilder | |class ClassA { | def createStream(): KStream[String, String] = { | import org.apache.kafka.streams.scala