Complete the code to create a stream builder instance.
StreamsBuilder builder = new [1]();StreamsBuilder is used to create the stream processing topology.
Complete the code to define a source stream from a topic named 'input-topic'.
KStream<String, String> source = builder.stream([1]);The stream method requires the topic name as a string literal.
Fix the error in the code to send the processed stream to an output topic.
processedStream.to([1]);The to() method requires the topic name as a quoted string.
Fill both blanks to build and start the Kafka Streams application.
Topology topology = builder.[1](); KafkaStreams streams = new KafkaStreams(topology, [2]); streams.start();
Use build() to create the topology and pass the properties object to KafkaStreams.
Fill all three blanks to create a stream, filter messages with value length > 5, and send to 'filtered-topic'.
KStream<String, String> stream = builder.stream([1]); KStream<String, String> filtered = stream.filter((key, value) -> value.[2]() > [3]); filtered.to("filtered-topic");
We read from "input-topic", use length() to get string length, and filter values longer than 5.
