Adding 'for' loop with delay in kafka streams
问题 Below is the code written to get the output as follows. my input will be in the form of JSON arrays, to seperate JSON arrays into Json objects i wrote the following code KStreamBuilder builder = new KStreamBuilder(); KStream<String, String> textlines = builder.stream("INTOPIC"); KStream<String, String> mstream = textlines .mapValues(value -> value.replace("[","" ) ) .mapValues(value -> value.replace("]","" ) ) .mapValues(value -> value.replaceAll("\\},\\{" ,"\\}\\},\\{\\{")) .flatMapValues